Bug #15198
closed
Link transformation issue
Added by Dimitrij Denissenko about 19 years ago.
Updated over 18 years ago.
Category:
RTE (rtehtmlarea + ckeditor)
Description
If I have a bold (or italic) text passage and I "add a link" to a single word, the whole passage will be stored in DB like:
<span style="font-weight: bold;">this passage </span>
<LINK 123><span style="font-weight: bold;">links</span></LINK>
<span style="font-weight: bold;"> to page 123</span>
That seems to be right, but the opposite happens, when I try it the other way round. If I create the link first and style the passage "bold" then the DB entry looks like this:
<span style="font-weight: bold;">this passage </span>
<a style="font-weight: bold;" href="?id=123">links</a>
<span style="font-weight: bold;"> to page 123</span>
In FE (particularly if you use simulateStaticDocuments) the link cannot be displayed correctly.
(issue imported from #M1843)
Files
Sorry, I forgot:
Tested with RTE version 0.7.0 & 0.7.6 on Firefox 1.5 RC2
I attached a phpmodifed "class.ux_t3lib_parsehtml_proc_new.php" that contains a possible solution.
The problem was:
If TYPOLINKS cannot handle "styled" A-tags which forces the "TS_links_db()" function in class "t3lib_parsehtml_proc" not to convert those links to LINK-tags (Line 629).
The solution I've done uses a pre-processor that also parses the content for "styled" A-tags, strips the "style" attribute and wraps the link-value with an additional SPAN-tag.
It works fine, but better solution are always welcome.
Sorry, but I've found another small bug (in my code), so please use "class.ux_t3lib_parsehtml_proc_FINAL.php".
Thanks for this transform.
However, it needs to be applied also inside blocks.
Will include and generalize to blocks in the next version.
Corrected in version 1.0.0.
Also available in: Atom
PDF