Issue Bug Closed

#32263HTML entity   is inserted before and after HTML Tags

Dieter Bunkerd 12/02/11, 08:26 updated 10/24/17, 20:19

Description

If an editor marks text for making it bold, italic and so on,
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
adds non breakable spaces before and after each HTML tag. An editor is unable to delete them again, not even in HMTL mode.

Editing the file (from line 2235)

return this.textArea.getValue().
replace(/[\x20]+/g, ‘\x20’).
replace(/^\x20/g, ‘ ’).
replace(/\x20$/g, ‘ ’);
// replace(/>\x20/g, ‘> ’).
// replace(/\x20</g, ‘ <’);

saves the problem. But what are these two replacements meant to do anyway?

TYPO3 4.6.1
htmlarea version 2.2.1

also present in
TYPO3 4.5.8
htmlarea version 2.1.7

Reviews 3