Bug #15116
closed"Copy & Paste HTML" does not always get rendert
0%
Description
If i select a link and some text on some random website and copy and paste it to rtx_rtehtmlarea, rtx_rtehtmlarea shows the link correctly as a link in the preview and if you select "switch to HTML-view" from the rtx_rtehtmlarea-toolbar the html is also correctly displayed, but when you save it, the link target is gone and only the link-caption is displayed as normal text.
if you only select one link without additional normal (non linked) text, it seems to work though.
I checked this again, and i think it has to do with the <p> -Tag, this bug seems to happen if there is a <p> -Tag in the copy and pasted text. I attached a sample HTML-string to this bug-report.
Steps to reproduce: open an rte-box, click on "switch to HTML-view", copy and paste the attached HTML to the rte, click on "switch to HTML-view" again (now in the preview window the link to webmin is shown), save (after saving the link target is gone).
(issue imported from #M1680)
Files
Updated by Stanislas Rolland about 19 years ago
Your anchor tag is outside any p or div tag. You must add the a tag to the list:
RTE.default.proc.allowTagsOutside = img,hr,address,a
if you want it to be preserved.