We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Manual edits to HTML are broken by Publii

  • #6613
    Avatar photo[anonymous]

    Is anyone having an issue where manual HTML edits in the WISIWIG editor are being broken after apply changes is pressed?

    Ampersand (&) symbols in links are being destroyed by the editor

    Example:  . . . server&qid= . . .

    is being replaced with: . . . server&qid . . .

    The above code sample is part of an href image link.

    Avatar photo[anonymous]

    The same thing happens when you insert an image. If the link contains an &, it is changed.

    Avatar photo[anonymous]


    I will try to diagnose this issue and try to fix it. Seems to be some compatibility layer for XHTML.

    Avatar photo[anonymous]


    I have made a deeper research of this topic, and the described behaviour is correct even in HTML5:

    In short – such replacement is used to protect before a case when param name is similar to existing named entities what can confuse older browser.

    Also such behaviour does not broke links so in fact you can ignore it.

    Avatar photo[anonymous]

    Have you tried putting a link with an ampersand into the application and then trying to click through on the link? What I am seeing is that the & is being escaped by the application. If you copy and paste custom code into the application go back to the WYSIWYG editor or save the page as an HTML file the link is broken.

    Avatar photo[anonymous]

    Yes, I have tested link: which has been converted to: and this link is working properly for me.

    Avatar photo[anonymous]

    This is still broken as of Version: 0.42.0 (build 16217).

    Avatar photo[anonymous]

    Thanks for the product (Publii). It is almost ready but not quite there for Ads with HTML. I switched back to WordPress and the ads work great.

    Avatar photo[anonymous]


    Looks like you’re not using the latest version of Publii. I’ve just tested Publii Version: 0.42.1 (build 16233) on Apple Mac OS, using the WYSIWYG editor. Everything works perfectly. Question marks in URLs are maintained in place.

    Try using the latest Publii version.