Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-08-21 18:29:50

swbrains
New member
Registered: 2007-08-15
Posts: 9

Translating character on load of HTML into editor...

Hi,

I have some text in a file that I load into the page and into the Xinha editor in a textarea (all part of an HTML page generated by a Perl script).  The text in the file contains the following link code:

<a href="http://www.^accountdomain^/cgi-bin/xxxxxxxxxxx">

When I load this into the editor, and then switch to HTML code view mode, it shows the href as follows:

<a href="http://www.%5eaccountdomain%5e/cgi-bin/xxxxxxxxxxx">

And when I save the contents of the editor (without making any changes) back to the file, it is of course written out with the caret symbol replaced by %5e.

The problem is that when another script displays the contents of the editor as part of an HTML page, my script looks to translate the special code ^accountdomain^ into the user's web site domain (or subdomain) which is has stored internally. 

So, is there a way to tell Xinha NOT to convert the caret (^) or any other symbols (don't know if this happens to other chars as well) to %-hex values?

Thanks!

Offline

#2 2007-08-22 09:27:01

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Translating character on load of HTML into editor...

Sorry, that is done by the browser (IE in this case, doesn't seem to happen in Firefox); nothing to be done about it.

Offline

#3 2007-08-22 11:30:23

swbrains
New member
Registered: 2007-08-15
Posts: 9

Re: Translating character on load of HTML into editor...

But if I read the text into a regular textarea (not using the Xinha editor), the caret symbols (^) are not translated to %5e, even in Internet Explorer.

Offline

#4 2007-08-23 08:52:57

wymsy
Xinha Community Member
From: Massachusetts, USA
Registered: 2005-04-01
Posts: 44
Website

Re: Translating character on load of HTML into editor...

Your best option is probably to deal with it in your server-side script: translate %5eaccountdomain%5e back to  ^accountdomain^.

Offline

Board footer

Powered by FluxBB