-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strip tags in CLI output #560
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good. Pre-approved. Left one feedback for your consideration.
@@ -522,6 +522,7 @@ private function flatten_file_results( $file_errors, $file_warnings ) { | |||
foreach ( $column_errors as $column_error ) { | |||
|
|||
$column_error['message'] = str_replace( '<br>', "\n", $column_error['message'] ); | |||
$column_error['message'] = wp_strip_all_tags( $column_error['message'] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Table(default) format
FILE: readme.txt
line | column | type | code | message | docs |
---|---|---|---|---|---|
0 | 0 | ERROR | outdated_tested_upto_header | Tested up to: 6.5 < 6.6. The "Tested up to" value in your plugin is not set to the current version of WordPress. This means your plugin will not show up in searches, as we require plugins to be compatible and documented as tested up to the most recent version of WordPress. | https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/#readme-header-information |
Json format
FILE: readme.txt
[{"line":0,"column":0,"type":"ERROR","code":"outdated_tested_upto_header","message":"Tested up to: 6.5 < 6.6.\nThe \"Tested up to\" value in your plugin is not set to the current version of WordPress. This means your plugin will not show up in searches, as we require plugins to be compatible and documented as tested up to the most recent version of WordPress.","docs":"https:\/\/developer.wordpress.org\/plugins\/wordpress-org\/how-your-readme-txt-works\/#readme-header-information"}]
CSV format
``` FILE: readme.txt line,column,type,code,message,docs 0,0,ERROR,outdated_tested_upto_header,"Tested up to: 6.5 < 6.6. The ""Tested up to"" value in your plugin is not set to the current version of WordPress. This means your plugin will not show up in searches, as we require plugins to be compatible and documented as tested up to the most recent version of WordPress.",https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/#readme-header-information ```Not blocker: The JSON format didn't remove \n
as it will exclude it if we pass second perameter as true
in wp_strip_all_tags()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works smoothly! Tested!
Follow-up to #557