- Posts: 281
Question Links in source subtag PAGE
- rola
- Topic Author
- Offline
- Senior Member
I have some URLS with quotation marks (") in it. For example:
The link created by webtrees is
Is this a bug? Or it works as designed?
I know that using quotation marks in URLs is not a very good idea, but I think that it is not uncommon.
Ladislav
Ladislav
webtrees 2.0.24 + ⚶ Vesta modules (from cissee.de/ )
testing webtres 2.1.5 + ⚶ Vesta modules
on PHP Version 7.4.28
Please Log in or Create an account to join the conversation.
- bertkoor
- Offline
- Platinum Member
- Greetings from Utrecht, Holland
Me thinks the double quote should be encoded as %22 here, and there is an authoritive answer I found here
The authoritative reference in generic URL syntax is currently RFC
2396,
which is available as hypertext at
www.cs.tut.fi/~jkorpela/rfc/2396/
but beware that the authoritative version is the plain text version in
official RFC repositories.
RFC 2396 explicitly declares the quotation mark as "excluded" in clause
2.4.3. Exclusion means that it may only appear in escaped form, as %22.
The reason given doesn't sound very strong:
"The angle-bracket < and > and double-quote " characters are excluded
because they are often used as the delimiters around URI in text
documents
and protocol fields."
But the statement is very clear.
So I conclude webtrees here works as designed (alas for you)
And these url here shows that this particular website accepts it with or without encoded quotes, even with an embedded space:
stamboom.BertKoor.nl runs on webtrees v2.1.20
Please Log in or Create an account to join the conversation.
- rola
- Topic Author
- Offline
- Senior Member
- Posts: 281
So I conclude webtrees here works as designed (alas for you)
Thanks for your answer.
Now I have to find a regular expression to chnge my double quotations.
Ladislav
Ladislav
webtrees 2.0.24 + ⚶ Vesta modules (from cissee.de/ )
testing webtres 2.1.5 + ⚶ Vesta modules
on PHP Version 7.4.28
Please Log in or Create an account to join the conversation.