You are not logged in.
Pages: 1
I would like to link to a particular url with an ampersand in it. The url is
http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=13140
As we know the above causes xhtml to fail. I have tried
http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=13140,
http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=13140
and
http://mitpress.mit.edu/catalog/item/default.asp?ttype=2\x26tid=13140
but the page returns the following error
Microsoft VBScript runtime error ‘800a000d’
Type mismatch: ‘aEditionDetails’
/catalog/item/default.asp, line 1452
Can anyone suggest a valid xhtml alternative?
neme.org | neme-imca.org | hblack.net | LABS
Offline
There you go:
Code:
<a href="http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=13140">
Illusions in Motion
</a>
Or in Textile:
"Illusions in Motion":http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=13140
Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />
Offline
Hi Jukka,
I am using custom_filelds, not textile and when I type http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=13140 it returns the error above. Try to go to it and you will see.
neme.org | neme-imca.org | hblack.net | LABS
Offline
Looking at it again, it is strange. Using textile the ampersand is encoded the the link does go there (from this forum), but without the textile, ie using
<a href="http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=13140">
Illusions in Motion
</a>
the link returns the error page.
neme.org | neme-imca.org | hblack.net | LABS
Offline
colak wrote:
I am using custom_filelds, not textile and when I type
http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=13140
Custom fields already do escaping for you. Please see escape attribute. The following generates valid HTML when the custom field contains http://example.com/?foo=1&bar=1:
<a href="<txp:custom_field name="publisher_link" />">
<txp:custom_field name="publisher_link" />
</a>
If you need to use HTML within a custom_field itself, set the escaping off (escape="").
Last edited by Gocom (2012-07-31 16:49:58)
Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />
Offline
Gocom wrote:
Custom fields already do escaping for you.
Indeed they do and I did have the escape attribute but forgot about it so I was adding the amp; after the & which is what was messing up the url destination. Thanks Jukka. Problem solved.
neme.org | neme-imca.org | hblack.net | LABS
Offline
Pages: 1