Web based family history software

Question Links in source subtag PAGE

  • rola
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 11 months ago #1 by rola
Links in source subtag PAGE was created by rola
I know there were some problems with links in the PAGE part of a source citation. Now it works (mostly) without problems.

I have some URLS with quotation marks (") in it. For example:
Code:
https://anno.onb.ac.at/cgi-content/anno?aid=mil&datum=18561101&query="Franz"&ref=anno-search&seite=6

The link created by webtrees is
Code:
https://anno.onb.ac.at/cgi-content/anno?aid=mil&datum=18561101&query=

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
  • Platinum Member
  • Greetings from Utrecht, Holland
More
2 years 11 months ago - 2 years 11 months ago #2 by bertkoor
Replied by bertkoor on topic Links in source subtag PAGE
It's good practice for a web application to sanitize all content supplied by random people that can submit a form, so that injection of scripts and other bad things is not possible.
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:
Code:
https://anno.onb.ac.at/cgi-content/anno?aid=mil&datum=18561101&query=%22Dabinovich%20Philipp%22&ref=anno-search&seite=6 https://anno.onb.ac.at/cgi-content/anno?aid=mil&datum=18561101&query=Dabinovich%20Philipp&ref=anno-search&seite=6

stamboom.BertKoor.nl runs on webtrees v2.1.20
Last edit: 2 years 11 months ago by bertkoor.

Please Log in or Create an account to join the conversation.

  • rola
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 11 months ago #3 by rola
Replied by rola on topic Links in source subtag PAGE


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.

Powered by Kunena Forum