On 20/08/05, Tim Starling <timstarling(a)users.sourceforge.net> wrote:
Modified Files:
Parser.php
Log Message:
With the introduction of action=render, internal links may also contain http://, and so
must be hardened against replacement by replaceExternalLinks in the same way as interwiki
links.
Index: Parser.php
[...]
+ * Hardens some text possibly containing URLs
against mangling by
+ * replaceExternalLinks()
+ */
+ function hardenURLs( $text ) {
+ return str_replace( 'http://', 'http-noparse://', $text
);
+ }
Did you mean to actually use this function somewhere, or did you
change your mind and forget to remove it? I should also note that it
won't work correctly, since I changed the other use of that notation
to fix bug 3090; it now also masks things other than http://... by
using preg_replace("/\b($wgUrlProtocols)/", UNIQ_PREFIX."NOPARSE$1",
...
In fact, even the issue you were addressing would probably want that,
since a wiki could generate URLs beginning https://
--
Rowan Collins BSc
[IMSoP]