Publii icon indicating copy to clipboard operation
Publii copied to clipboard

Links and Edits to HTML are broken by Publii

Open Linus-007 opened this issue 2 years ago • 8 comments

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.

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

Linus-007 avatar Dec 07 '21 05:12 Linus-007

It happens to me too, it's quite annoying.

wuniversales avatar Feb 20 '22 14:02 wuniversales

It seems that this behaviour is valid: https://stackoverflow.com/questions/50069810/tinymce-converting-ampersand-in-querystring-to-html-entity

dziudek avatar Feb 20 '22 17:02 dziudek

Thanks for validation. No one in the Publii site believes this is an issue. Is there a fix?

Linus-007 avatar Feb 23 '22 16:02 Linus-007

0.39 version is no better. Others have confirmed the issue. Any updates?

Linus-007 avatar Mar 21 '22 00:03 Linus-007

@Linus-007 - as it is stated in the linked resource - it seems to be a valid behaviour. I have tested it locally and links with & in the src attribute are properly parsed by my browser. Publii v.0.39 contains updated TinyMCE editor so it seems that it is ok.

If it is working I do not see any reason to change this behaviour, especially due fact that it is correct also from the HTML specification point of view.

dziudek avatar Mar 21 '22 15:03 dziudek

To be clear, the links are visible in the post tool, but broken when previewed or synchronized to my website. The issue is not resolved with 0.39.

Linus-007 avatar Mar 22 '22 18:03 Linus-007

@Linus-007 - I still do not understand one thing - what do you mean by "broken"? These links for me are working correctly when they are clicked.

dziudek avatar Mar 23 '22 08:03 dziudek

Broken = links clicked result in an error. The characters in amazon affliate links are being destroyed.

Linus-007 avatar Jul 19 '22 01:07 Linus-007

For Broken Description: Example: . . . server&qid= . . . is being replaced with: . . . server&qid . . . The above code sample is part of an href image link.

Users who click the link that is modified by Publii get a 404 not found error.

Linus-007 avatar Dec 20 '22 05:12 Linus-007

Any updates? This is still an issue with Version: 0.42.0 (build 16217).

Linus-007 avatar Apr 06 '23 04:04 Linus-007

@Linus-007 - there is no update, because I do not see any issue there. Replacing & to & is absolutely correct https://stackoverflow.com/questions/50069810/tinymce-converting-ampersand-in-querystring-to-html-entity

dziudek avatar Apr 06 '23 07:04 dziudek