-
Notifications
You must be signed in to change notification settings - Fork 12
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
-- is not allowed in HTML comments #6
Comments
--
is not allowed in HTML comments
Thanks for reporting! I also noticed Firefox complaining about it. According to the w3c validator, it's a warning because it means the page is not XML 1.0 complaint. I guess it's an issue because some people use XML parsers to parse HTML, maybe? Not sure. Anyhow, yes, it should be fixed. I'll change it to underscores instead, or better yet, upgrade to a format that is also versioned and is more versatile while at it. |
Maybe you can just use a HTML meta tag? |
That's a very interesting idea. I like the good semantics too! I'll try to take a look into it over the weekend. |
BTW when stripping the tag I strongly suggest to only strip the actual key (so just the value of the meta tag). So leave an empty tag behind. |
I forgot to reply, but yeah, I'm fully aware of such browser oddities, and I'm therefore being extra defensive about it. I have two concerns with putting it in the meta tag:
I solution to both would be just looking for a certain text, e.g.: "SIGNED-PAGES: " which can be anywhere in the document, not just the meta tag, and then it's up to the user (and shows in our examples) to put it inside the "value" in the meta tag. This will also support #15. One disadvantage with that though is that if a page doesn't have a signature having this configuration be anywhere could be a problem with user generated content and #1. A malicious user on a forum with no such configuration could trigger a request to be added to the user's signed pages (we are potentially already vulnerable to that, luckily #1 is not yet implemented). In summary: I'd need to think about it, though maybe after all it is best to just have it in the meta tag. |
What happens if it is found more than once? That could e.g. be the result of an XSS attack. When an XSS attack can inject a signature, I guess that's not so nice. 😄 I would rather prefer a fallback - use meta tag by default and fall back to current behaviour? |
Even now it only looks for the first. So only the page that doesn't have one case is a concern. Anyhow, plenty of ideas here. Just need to find the time to implement them. :) Been awfully busy unfortunately, so never go around to implementing all of the things I want to. Though patches are welcome! |
When following the HTML comment syntax correctly
--
is not allowed in the comments. At least Firefox complains about this when viewing the site in the source code mode.So maybe you can omit it? (and just internally add it, or so)
The text was updated successfully, but these errors were encountered: