Download
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.

    #6614
    Avatar photo[anonymous]

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

    #6637
    Avatar photo[anonymous]

    Hi,

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

    #6645
    Avatar photo[anonymous]

    Hi,

    I have made a deeper research of this topic, and the described behaviour is correct even in HTML5: https://stackoverflow.com/questions/19441750/do-ampersands-still-need-to-be-encoded-in-urls-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.

    #6647
    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.

    #6703
    Avatar photo[anonymous]

    Yes, I have tested link: https://dziudek.pl/?v=100&paged=5&lol=10 which has been converted to: https://dziudek.pl/?v=100&paged=5&lol=10 and this link is working properly for me.

    #9769
    Avatar photo[anonymous]

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

    #9978
    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.

    #9979
    Avatar photo[anonymous]

    @lps

    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.