Announcement

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

#1 2011-10-19 10:51:10

xtianjs
New member
Registered: 2011-10-19
Posts: 1

trouble with "{" and "}" - don't want them to convert

Hi,
I am having trouble with the "{" and "}" characters converting when in links e.g. href="{url}"

I have the  "only7BitPrintablesInURLs" set to true
this.only7BitPrintablesInURLs = true;

As the braces are part of the regular ascii set shouldn't they not convert.

any insights appreciated

xtianjs

Offline

#2 2011-10-28 02:05:44

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: trouble with "{" and "}" - don't want them to convert

That setting does not do what you think it does - it forces all high-ascii (greater than 7 bit) characters to be url encoded even when they normally are not, but it does not affect what happens to lower ascii characters at all.

If you are in chrome, hit CTRL-SHIFT-J now and type into the console:

  escape("{")

and you will see that indeed, it is escaped to %7B by the browser.

That's just how javascript's escape() function works. 

Your best solution is to use some string manipulation on your end to replace %7F with { and %7D with } once you have the content out of Xinha.


James Sleeman

Offline

Board footer

Powered by FluxBB