mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:55:25 +08:00
FIX: do not escape slash for category text description (#20460)
Original solution to use `description` instead of `text_description` was wrong: https://github.com/discourse/discourse/pull/20436 Problem is that we have to escape HTML tags. However, we would like to use escape method which is keep `/` intact. Expected behavior is given by ERB::Util.html_escape instead of Rack::Utils.escape_html /t/92015
This commit is contained in:

committed by
GitHub

parent
52d4de7b45
commit
d92fd30d23
@ -18,6 +18,6 @@ RSpec.describe CategoryBadge do
|
||||
c = Fabricate(:category, description: '<code>\' <b id="x"></code>')
|
||||
html = CategoryBadge.html_for(c)
|
||||
|
||||
expect(html).to include("title='' <b id="x">'")
|
||||
expect(html).to include("title='' <b id="x">'")
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user