HTML encoding issue with Categories Name
-
Just noticed this, did a quick search on the forum and didn't find anything:
When using special characters in a category name, it gets HTML encoded, (Which is good), but when you attempt to make a second edit to the name of the category, it get HTML encoded a second time (because of the ampersand at the front).
Reproduce:
This is easily evident with the default "Comments & Feedback" category.
- Edit the name of Comments & Feedback, but keep the ampersand.
- Save the category
- Edit the same category a second time.
- You'll see the doubly encoded category name as
&
Expected behaviour:
When editing the name of the category, it should show the fully decoded category name, and encode it when it's saved. At the moment, it displays the HTML encoded name, then encodes the name as if it wasn't already encoded.
You could also scrub the name first, but displaying the HTML decoded name seems like a safer bet to me.
Hope this helps!
J
-
-
already reported on the issue tracker
& in category name · Issue #4383 · NodeBB/NodeBB
NodeBB 1.0.1 version, v1.x.x branch, MongoDB 3.2.3, fresh install Low priority Admin > Manage > Categories > Edit > Comments & Feedback Comments & Feedback in Category Name text field. Replace & with & and save to get same result.
GitHub (github.com)