Skip to content

Commit

Permalink
Rollup merge of #109375 - clubby789:unescape-deprecated-doc, r=jsha
Browse files Browse the repository at this point in the history
rustdoc: Fix improper escaping of deprecation reasons

Fix #109374

r? `@jsha`
  • Loading branch information
matthiaskrgr authored Mar 20, 2023
2 parents eb1f8dc + c74f2dc commit 1309235
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/html/templates/short_item_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% when Self::Deprecation with { message } %}
<div class="stab deprecated"> {# #}
<span class="emoji">👎</span> {# #}
<span>{{message}}</span> {# #}
<span>{{message|safe}}</span> {# #}
</div> {# #}
{% when Self::Unstable with { feature, tracking } %}
<div class="stab unstable"> {# #}
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc/deprecated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ pub struct V;
pub struct W;

// @matches deprecated/struct.X.html '//*[@class="stab deprecated"]' \
// 'Deprecated: shorthand reason$'
#[deprecated = "shorthand reason"]
// 'Deprecated: shorthand reason: code$'
#[deprecated = "shorthand reason: `code`"]
pub struct X;

0 comments on commit 1309235

Please sign in to comment.