Closed v0lk3r closed 12 years ago
In the example below (line 2) the link is not detected if the protocol is not specified. Line 3 shows the working example
In [1]: from mwlib.uparser import simpleparse as p In [2]: p('[//toolserver.org/~geohack/geohack.php?pagename=Benutzer%3AVolker.haas/Test&language=de¶ms=51.4213888889_N_9.64805555556_E_dim:100_region:DE-NI_type:waterbody&title=Namentlicher+Beginn+Weser bla]') Article u'[' u'//toolserver.org/~geohack/geohack.php?pagename=Benutzer%3AVolker.haas/Test&language=de¶ms=51.4213888889_N_9.64805555556_E_dim' u':' u'100_region' u':' u'DE-NI_type' u':' u'waterbody&title=Namentlicher+Beginn+Weser bla' u']' Out[2]: Article In [3]: p('[http://toolserver.org/~geohack/geohack.php?pagename=Benutzer%3AVolker.haas/Test&language=de¶ms=51.4213888889_N_9.64805555556_E_dim:100_region:DE-NI_type:waterbody&title=Namentlicher+Beginn+Weser bla]') Article NamedURL->u'http://toolserver.org/~geohack/geohack.php?pagename=Benutzer%3AVolker.haas/Test&language=de¶ms=51.4213888889_N_9.64805555556_E_dim:100_region:DE-NI_type:waterbody&title=Namentlicher+Beginn+Weser' u' bla' Out[3]: Article
added test with https://github.com/pediapress/mwlib/commit/58f64c24d54f93282ceed766a9e9d7762ed25372
In the example below (line 2) the link is not detected if the protocol is not specified. Line 3 shows the working example