Sign in

Manual edits to HTML are broken by Publii

  • This topic has 5 replies, 2 voices, and was last updated 11 months, 1 week ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6613
    Avatar photolps

    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 photolps

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

    #6637
    Avatar photoTomasz Dziuda

    Hi,

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

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6645
    Avatar photoTomasz Dziuda

    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.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6647
    Avatar photolps

    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 photoTomasz Dziuda

    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.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.