Bug #28497

htmlArea RTE: Relative url's on pasted links/images in Firefox

Added by Urs Braem over 7 years ago. Updated over 1 year ago.

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

100%

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

Description

I have a bug that appears in several of my 4.5.3 Installations.

There is some Text in the RTE which is wrapped by an internal link (inserted via the element browser).
When the editor wants to move this link to another position in the text, or duplicate it, he copies / pastes it.

The link looked like this before being copied/pasted:
<a href="http://example.ch/?id=27#39" class="internal-link">lorem</a>

And like this after the action
<a href="http://example.ch/../?id=27#39" class="internal-link">lorem</a>

RealURL corrects that somehow, so the page links still work, but the jump to the anchor stays broken.

This ocurred with Firefox 4 on win and Firefox 5 on Mac.
I tested with IE 9, where this wouldn't occur.

I disabled my personal RTE TSconfig to check if it was provoked by some misconfiguration, but that wouldn't change anything.

Please let me know if you need more testing on other browsers.

Thanks
Urs


Related issues

Related to TYPO3 Core - Bug #24852: htmlArea RTE: Clickenlarge bug when move image Closed 2011-01-27
Related to TYPO3 Core - Bug #29141: RTE, Firefox 6 and mailto links Closed 2011-08-22
Duplicated by TYPO3 Core - Bug #27353: rtehtmlarea_2.0.8 - picture drag&drop with click-enlarge wrong in mozilla Closed 2011-06-10

Associated revisions

Revision 58dd112c (diff)
Added by Stanislas Rolland over 7 years ago

[BUGFIX] htmlArea RTE: Relative url's on pasted links/images in Firefox

When copying/pasting an internal link or image from and to the RTE
editing area, Firefox changes the href or src to a relative url.
After save, the url ends up being wrong.

Similar issues arises when moving images or links inside the editing
area and when dropping images in the RTE from the image dialogue
window.

This change works around Firefox issue
https://bugzilla.mozilla.org/show_bug.cgi?id=613517,
by making the url absolute again before saving or toggling
to source text mode, as well as on paste and drop events.

Change-Id: I27024687d897a36133113f47b4d52ca9e0ab6c90
Resolves: #28497, #24852, #27353
Releases: 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/3916
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland

Revision 9402d650 (diff)
Added by Stanislas Rolland over 7 years ago

[BUGFIX] htmlArea RTE: Relative url's on pasted links/images in Firefox

When copying/pasting an internal link or image from and to the RTE
editing area, Firefox changes the href or src to a relative url.
After save, the url ends up being wrong.

Similar issues arises when moving images or links inside the editing
area and when dropping images in the RTE from the image dialogue
window.

This change works around Firefox issue
https://bugzilla.mozilla.org/show_bug.cgi?id=613517,
by making the url absolute again before saving or toggling
to source text mode, as well as on paste and drop events.

Change-Id: I3b43291b9c8fa50763d649ac0fdc9b9e692869bf
Resolves: #28497, #24852, #27353
Releases: 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/3918
Reviewed-by: Stefan Neufeind
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland

History

#1 Updated by Alienor.net over 7 years ago

I have seen this behavior on numerous installations too, not only 4.5.

I strongly believe it is related to this Firefox bug :
https://bugzilla.mozilla.org/show_bug.cgi?id=613517

#2 Updated by Urs Braem over 7 years ago

I've added a comment on Bugzilla.

#3 Updated by Stanislas Rolland over 7 years ago

  • Subject changed from RTE copy / paste links - Firefox to htmlArea RTE: Relative url's on pasted links/images in Firefox
  • Status changed from New to Accepted
  • Assignee set to Stanislas Rolland
  • Target version set to 4.5.5
  • PHP Version set to 5.3

#4 Updated by Stanislas Rolland over 7 years ago

I think this does not happen in Safari, Chrome or Opera. Please confirm.

#5 Updated by Mr. Hudson over 7 years ago

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

#6 Updated by Mr. Hudson over 7 years ago

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

#7 Updated by Stanislas Rolland over 7 years ago

  • Status changed from Accepted to Under Review

#8 Updated by Stanislas Rolland over 7 years ago

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

#9 Updated by Stanislas Rolland over 7 years ago

  • Status changed from Resolved to Under Review

#10 Updated by Stanislas Rolland over 7 years ago

Mr. Hudson wrote:

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

Please test this patch on TYPO3 4.5.

#11 Updated by Urs Braem over 7 years ago

Wow, great, thanks!

I've tried out the patch on 4.5.4, although this was not systematical testing.
It seemed to work, though.

#12 Updated by Stanislas Rolland over 7 years ago

  • Status changed from Under Review to Resolved

#13 Updated by Riccardo De Contardi over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF