[TYPO3-RTE] RTE error and changing & to &

Krystian Szymukowicz t33kRE.MO.VE. at RE.MO.VE.prolabium.com
Wed Feb 28 19:14:30 CET 2007


Sara Weale wrote:
> I'm adding a link to a page created in an alternative language into text 
> in the htmlareaRTE.
> 
> To do this I need to manually add a link through the 'make link' 
> function of the RTE (as it is not possible to add links to the 
> alternative language page using the one tree model).
> 
> A page in English (default) is index.php?id=100 to add a link to is 
> refers to a Welsh page we just add &L=1 to this address.
> 
> Once the page is saved in the RTE I get an RTE error as follows (because 
> it is changing & to & RTE sees this (quite rightly) as a broken link 
> and adds the lovely yellow box with the red line).
> 
> The html source for the link should be:
> 
> <a href="?id=147&L=1">tîm ymholiadau.</a>
> 
> but now I get:
> 
> <a href="http://webdev.llgc.org.uk/?id=147&amp;L=1" 
> class="external-link-new-window" title="Ymholiadau" rteerror="No page 
> found: 0" style="border: 2px solid red; background-color: yellow; color: 
> black;">tîm ymholiadau.</a>
> 
> How do I stop the RTE from doing this. I have removed the 
> Typo3HtmlParser but this changes nothing!
> 

I can not reproduce your error in my TYPO3 installation and I am not 
sure if the error is because of changing & to &amp;. I can create manual 
link with 2 parameters and &amp; and I have no errors.

I suggest you to get the newest rtehtmlarea extension. You may try to 
test TYPO3 4.1 RC2. There is newest rtehtmlarea 1.5.1dev. Just check if 
you can reproduce that error in new TYPO3 installation.


If you still think its because of changing & to &amp; I can give you a 
dirty hack to prevent htmlarea changing & to &amp;

Find file:
typo3\sysext\rtehtmlarea\htmlarea\htmlarea-compressed.js

and find text:
str=str.replace(/&/g,"&amp;");

comment it like this
/*str=str.replace(/&/g,"&amp;");*/
and save.

go typo3temp/ folder and delete all files with *.js extension.

Clear browser cache and reload backend.

It is tested and worked in my installation.



--
grtz
Krystian Szymukowicz



More information about the TYPO3-project-rte mailing list