MDL-22390 autolink filter: handle URLs in brackets better.
commitc2c6af946ce4609144049a5d89480702878d52f8
authorTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 26 Apr 2013 16:51:23 +0000 (26 17:51 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 7 Jun 2013 09:40:37 +0000 (7 10:40 +0100)
tree913b88da27bf8d49b353cf53ca67e342d3cd0f86
parentb3be471f52fe2129269a1efc886e9c2f2e3fcef1
MDL-22390 autolink filter: handle URLs in brackets better.

This breaks some legitimate URLs like
http://en.wikipedia.org/wiki/Slash_(punctuation).
This is a necessary trade-off. Many other web systems do not handle that
case correctly either. The work-around it so escape the ) as %29.

This commit also improves the way the unit tests for this work.

It also fixes a couple of other tricky cases that were spotted in
the forums while this was being discussed. See the new test cases.
filter/urltolink/filter.php
filter/urltolink/tests/filter_test.php