froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.3k stars 674 forks source link

Froala v4.2.2 truncating <a> href values upon initial load #4815

Open burtonrhodes opened 2 months ago

burtonrhodes commented 2 months ago

When loading an editor with predefined html, the href value is truncated. The value should be the same as the initial html.

Steps to reproduce the problem.

Here is a jsFiddle demonstrating the problem with the latest 4.2.2 https://jsfiddle.net/burtonrhodes/yxdpoLsk/8/

You'll notice the initial text is

<p>
<a href="http://localhost:8080/afs/portal/?xactionId=139263">http://localhost:8080/afs/portal/?xactionId=139263</a>
</p>

But the editor modifies the html href value to

<p>
<a href="http://localhost:8080/afs/portal/?xacti">http://localhost:8080/afs/portal/?xactionId=139263</a>
</p>
Editor version.

4.2.2 (this does not happen in version 4.2.1)

OS.

Windows 11

Browser.

Chrome Version 128.0.6613.120 (Official Build) (64-bit)

forum-is commented 2 months ago

We can confirm this issue, also irrevocably breaks "src" attributes on img tags. Please fix ASAP.

burtonrhodes commented 2 months ago

@forum-is You might consider emailing support@froala.com and reference this issue as I'm not sure how often this repository is checked.

ilyaskarim commented 2 weeks ago

We are aware of this issue, and it is scheduled for a fix in our next editor release, V4.3.1.

richardnorthcottvisit commented 1 week ago

We're seeing the same issues with the URL truncations when used in href values. We also use querystring property names which include the characters 'on' - this appears to be where the truncation begins. There may be other use cases too.

Example <a href="https://mysite.com/s?cont=1234">link</a>

becomes <a href="https://mysite.com/s?c">link</a>