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.

    1. Edit the name of Comments & Feedback, but keep the ampersand.
    2. Save the category
    3. Edit the same category a second time.
    4. 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



  • @Jason-Neal

    0_1458513327604_categorynamebug1.png 0_1458513335575_categorynamebug2.png

    yes i noticed the same after each save


  • Plugin & Theme Dev

    already reported on the issue tracker

    https://github.com/NodeBB/NodeBB/issues/4383


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.