-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show_map.php should handle & in url #28
Comments
I think the root problem is that the rss-link uses the Html encoding content is a safety measure, but in this case, the Doma service has full control over the url and can output the raw value in the link element. |
That is a good find @runerys , thanks.
Will refactor the issue and PR to fix the root cause. |
Yes - and "View source" in the browser reveals the same. I have to admit that I struggle to find out if the RSS link-element MUST be encoded according to standards. I've searched around a bit, but all examples I find are to blogs with nice folder-like urls. |
Unfortunately, I'm wrong. I found some validators, and the link element must be html encoded. The error is in the client application handling the feed and NOT html decoding the link before opening it. So I guess a fix must look more like your original proposal. You can try validating both urls and direct rss input here: https://validator.w3.org/feed/ |
Some RSS handlers htmlescape special signs in the links, such as
&
->&
. If the urls are then accessed directly without converting back, doma can't find the map.Example:
Link from doma rss feed:
https://kartarkiv.nydalen.idrett.no/show_map.php?user=vbj&map=7191
Link after the feed has been processed by w3 rss feed validator ( https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fkartarkiv.nydalen.idrett.no%2Frss.php ):
https://kartarkiv.nydalen.idrett.no/show_map.php?user=vbj&map=7191
The later link result in doma not finding the map, and thus returning
The map has been removed.
to the user.Related code:
https://github.com/matstroeng/doma/blob/master/src/show_map.controller.php#L19
Suggested solution: Doma/php should handle
&
as url parameter.Edit:
Think this must be solved in code, since:
The text was updated successfully, but these errors were encountered: