Solving the URL Code Problem with Parentheses

  • Context: Bug 
  • Thread starter Thread starter Redbelly98
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
If you type in a url that ends with a ")", the ")" gets omitted by the code that generates a link.

For example, typing

[noparse]http://en.wikipedia.org/wiki/Commutator_(electric)[/noparse]

then results in the following bad link

[noparse]http://en.wikipedia.org/wiki/Commutator_(electric ) [/noparse]

In the final post, this appears as
http://en.wikipedia.org/wiki/Commutator_(electric )

The ")" should get included in the URL:

[noparse]http://en.wikipedia.org/wiki/Commutator_(electric) [/noparse]

which would become a valid link in the post:
http://en.wikipedia.org/wiki/Commutator_(electric)


Here's the thread where this happened:
https://www.physicsforums.com/showthread.php?p=2093336&posted=1#post2093336
 
Last edited by a moderator:
Physics news on Phys.org