Making WordPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1468 closed defect (bug) (fixed)

Encoded `<code>` tags in parameter docblocks

Reported by: johnbillion's profile johnbillion Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords: needs-patch
Cc:

Description

Example: https://developer.wordpress.org/reference/functions/apply_filters/

The $value and $var parameters of this function contain `backticks` in their descriptions. These are converted to <code> tags, but these are being escaped on output and therefore appear on screen as <code>$tag</code>.

Change History (5)

This ticket was mentioned in Slack in #docs by johnbillion. View the logs.


9 years ago

#2 @netweb
9 years ago

I think these are now displaying correctly?

https://cldup.com/6yRnRuXiXJ.png

#3 @netweb
9 years ago

That said, even though it appears resolved per comment 2 above for that use case, another instance of this same issue can be seen in the "changelog" section for get_post_type_labels():

The source code: https://core.trac.wordpress.org/browser/tags/4.4/src/wp-includes/post.php#L1348

* @since 4.3.0 Added the `featured_image`, `set_featured_image`, `remove_featured_image`,
*              and `use_featured_image` labels.
* @since 4.4.0 Added the `insert_into_item`, `uploaded_to_this_item`, `filter_items_list`,
*              `items_list_navigation`, and `items_list` labels.

The rendered output does dot wrap the above in "code tags":

 text/html
<section class="changelog">
	<h2>Changelog</h2>
	<ul>
		<li><strong>Since:</strong> WordPress <a href="https://developer.wordpress.org/reference/since/3.0.0/">3.0.0</a> </li>
		<li><strong>Since:</strong> WordPress <a href="https://developer.wordpress.org/reference/since/4.3.0/">4.3.0</a> <span class="since-description">Added the featured_image, set_featured_image, remove_featured_image,              and use_featured_image labels.</span></li>
		<li><strong>Since:</strong> WordPress <a href="https://developer.wordpress.org/reference/since/4.4.0/">4.4.0</a> <span class="since-description">Added the insert_into_item, uploaded_to_this_item, filter_items_list,              items_list_navigation, and items_list labels.</span></li>
	</ul>
</section>

#4 @coffee2code
9 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 2282:

developer.wordpress.org: Allow use of 'code' tags in changelog descriptions.

Example: https://developer.wordpress.org/reference/functions/register_taxonomy/

See r2206.
Fixes #1468.

#5 @coffee2code
9 years ago

Just to follow-up: the originally reported issue was fixed in [2206].

[2282] addressed what @netweb reported, which was a separate issue.

Note: See TracTickets for help on using tickets.