Skip to content
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

Wikipedia regexp can produce malformed HTML #3

Open
acdha opened this issue Dec 3, 2009 · 0 comments
Open

Wikipedia regexp can produce malformed HTML #3

acdha opened this issue Dec 3, 2009 · 0 comments

Comments

@acdha
Copy link

acdha commented Dec 3, 2009

The stock wikipedia rule is:

http://\S*.wikipedia.org/wiki/\S*

I encountered problems where correct markup such as:

<a href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a>.

was incorrectly converted into something like this, which is either silently ignored by browsers or results in all of the output until the next </a> being ignored, jumbled, etc:

<a href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a.>

I'm currently using this on my site but it probably needs further testing to avoid other silent failures:

http://\S*.wikipedia.org/wiki/[^ .<]+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant