Opened 6 years ago
Closed 6 years ago
#39570 closed defect (bug) (fixed)
Extra markup added to links with IE11
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | Cc: |
Description
When pasting a link to TinyMCE using Win 7, IE 11 extra markup is added to links resulting in problems with display. For example, pasting:
<a href="https://codex.wordpress.org/Validating_Sanitizing_and_Escaping_User_Data" target="_blank">number of functions available to handle nearly any situation</a>
will result in:
<a href="https://codex.wordpress.org/Validating_Sanitizing_and_Escaping_User_Data" target="_blank"><u><span style="color: #0066cc;">number of functions available to handle nearly any situation</span></u></a>
This is reproducible by pasting any text with a link into TinyMCE using Windows 7 and IE11.
Attachments (1)
Change History (7)
#2
@
6 years ago
In 39570.patch: remove <font>
and <u>
tags from inside links when pasting in IE and Edge, but keep their content/text.
The actual tag that is inserted by these browsers is <font color=...>
and TinyMCE converts it to a span to make it valid.
Note: See
TracTickets for help on using
tickets.
Confirmed. Also happens in Edge on Win10. Similar to the cruft that Chrome inserts but only when pasting links (fortunately).
The good news is that we already have filtering on paste for Chrome/WebKit what we can also turn on for IE/Edge.
The bad news is that Edge can also insert other tags without inline styles, in particular seeing
<u>
(see the example in the ticket) and<font>
!! The only thing I can think of is to strip these tags when wrapped in links.This will remove the
<u>
even if the original content that was copied had that tag combination. However it seems better to "clean up" such cases.