Opened 3 years ago
Closed 3 years ago
#55506 closed defect (bug) (fixed)
HTML tags not escaped
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | REST API | Keywords: | has-patch needs-testing |
Focuses: | docs | Cc: |
Attachments (4)
Change History (16)
#2
@
3 years ago
- Component changed from WordPress.org Site to REST API
- Keywords needs-patch good-first-bug added; 2nd-opinion removed
- Milestone changed from Awaiting Review to 6.0
Hi there, welcome back to WordPress Trac! Thanks for the ticket.
As noted above, any issues with the documentation parser should indeed be reported on Meta Trac.
However, per the WordPress documentation standards, function summaries should not use any markup:
No HTML markup or Markdown of any kind should be used in the summary. If the text refers to an HTML element or tag, then it should be written as “image tag” or “img” element, not “<img>”. For example:
- Good: Fires when printing the link tag in the header.
- Bad: Fires when printing the <link> tag in the header.
So I think the WP_REST_URL_Details_Controller::get_title()
description:
Parses the
<title>
contents from the provided HTML.
should be changed to this:
Parses the title tag contents from the provided HTML.
#4
@
3 years ago
- Keywords needs-patch added; has-patch removed
Hello @rsiddharth thanks for the patch it looks good for me, but as you are at it, would you mind to fix some related typos in the same file? here they are :
- WP_REST_URL_Details_Controller::get_document_head;
- WP_REST_URL_Details_Controller::get_meta_with_content_elements,
- WP_REST_URL_Details_Controller::parse_url_details,
The summary of the above functions contain html tag, can you fix them please?
#5
@
3 years ago
Thanks all.
Got it, next time will post at https://meta.trac.wordpress.org/newticket
#6
@
3 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 53048:
#8
@
3 years ago
- Keywords has-patch needs-testing added; good-first-bug needs-patch removed
55506.patch fixes some more instances of HTML tags and also improves the formatting of HTML special characters in descriptions.
#9
@
3 years ago
- Keywords close added
Hi @johnbillion thanks for the patch, but I think the best place to report it is here #54729
#10
@
3 years ago
- Keywords close removed
#54729 is a general ticket for any issues that don't have their own ticket. For more specific changes like this, I think it's fine to make any follow-up fixes on the same ticket, so that the context is clear.
#11
@
3 years ago
Thanks for the additional fixes!
Looking at 55506.2.patch, I think most of these instances are fine, as the documentation standards, when mentioning HTML markup, specifically refer to function summaries and not other DocBlock parts or inline comments. As seen in the wp_enqueue_script() function reference, the description for the $in_footer
parameter is displayed correctly as is.
Hi there, welcome to core trac; thanks for the report;
Seems like the right place to report this kind of issue is here.
RE: https://prnt.sc/VTo81CkFK-nu