Bug #25302

Broken links representation gets saved to the database

Added by Oliver Hader over 8 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2011-03-10
Due date:
% Done:

100%

TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Imagine that you have a content element with a link to a internal page that does not exist anymore. On editing this content element, RTEhtmlarea marks this link with yellow background and a red border.
On saving the form without touching the content in the RTE at all, the styles used for representing this broken link are saved to the database and then get wrapped by an addition span tag.

So, on saving again one will end out in something like this:

< p >< em >
  < span style="background-color: yellow; border:2px red solid; color: black;" >
    < a style="background-color: yellow; border:2px red solid; color: black;" rteerror="No page found: 2913" title="Opens internal link in current window" class="internal-link" href="http://dev45.local/?id=99999" >TEST< /a >
  < /span >
< /em >< /p >

(issue imported from #M17917)

0017917_screenshot.png View (36.2 KB) Administrator Admin, 2011-03-10 12:20

0017917.patch View (770 Bytes) Administrator Admin, 2011-03-11 17:49

Associated revisions

Revision f7fab17f (diff)
Added by Stanislas Rolland about 8 years ago

[BUGFIX] Broken links representation gets saved to the database

Solution: Avoid wrapping the a tag with span tag when style attribute
is set when rteerror attribute is also set.

Change-Id: I0f517b9f01deec05c9d31661a5fcf13f60ea0d37
Resolves: #25302
Releases: 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/4351
Reviewed-by: Georg Ringer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog

Revision e0fa9bd0 (diff)
Added by Stanislas Rolland about 8 years ago

[BUGFIX] Broken links representation gets saved to the database

Solution: Avoid wrapping the a tag with span tag when style attribute
is set when rteerror attribute is also set.

Change-Id: I1f68a0f9a67934b9ac3288117f831219e8d30f99
Resolves: #25302
Releases: 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/4352
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog

Revision a3fe076f (diff)
Added by Stanislas Rolland about 8 years ago

[BUGFIX] Broken links representation gets saved to the database

Solution: Avoid wrapping the a tag with span tag when style attribute
is set when rteerror attribute is also set.

Change-Id: I025670f54fd8e78e8d06b03edf926470f8dce76a
Resolves: #25302
Releases: 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/4353
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

History

#1 Updated by Oliver Hader over 8 years ago

This is a tricky one. The call to TS_transform_db() in t3lib_parsehtml_proc will add the span tag around the anchor. The call to TS_links_db() would have removed the rteerror and style attributes of that broken anchor tag. However, since TS_links_db() is called after TS_transform_db() the span tag is already there.

So my patch just changes the order of processing the modes, to have ts_links before ts_transform/css_transform. I'm not an expert on the ParseHtml class and thus also don't know about negative side-effects.

#2 Updated by Oliver Hader over 8 years ago

  • Subject changed from Broken links representation gets save to the database to Broken links representation gets saved to the database
  • Category set to RTE (rtehtmlarea + ckeditor)
  • Target version changed from 0 to 1061
  • TYPO3 Version set to 4.4

#3 Updated by Oliver Hader over 8 years ago

  • Target version changed from 1061 to 1264

#4 Updated by Stanislas Rolland over 8 years ago

  • Assignee set to Stanislas Rolland
  • PHP Version set to 5.3

#5 Updated by Mr. Hudson over 8 years ago

Patch set 1 of change I0f517b9f01deec05c9d31661a5fcf13f60ea0d37 has been pushed to the review server.
It is available at http://review.typo3.org/4351

#6 Updated by Mr. Hudson over 8 years ago

Patch set 1 of change I1f68a0f9a67934b9ac3288117f831219e8d30f99 has been pushed to the review server.
It is available at http://review.typo3.org/4352

#7 Updated by Mr. Hudson over 8 years ago

Patch set 1 of change I025670f54fd8e78e8d06b03edf926470f8dce76a has been pushed to the review server.
It is available at http://review.typo3.org/4353

#8 Updated by Oliver Hader over 8 years ago

  • Target version changed from 1264 to 1341

#9 Updated by Stanislas Rolland about 8 years ago

  • Status changed from New to Under Review

#10 Updated by Stanislas Rolland about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#11 Updated by Ernesto Baschny over 6 years ago

  • Target version deleted (1341)

#12 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF