Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -157,6 +157,7 @@ |
158 | 158 | |
159 | 159 | !! end |
160 | 160 | |
| 161 | + |
161 | 162 | ### |
162 | 163 | ### Comments |
163 | 164 | ### |
— | — | @@ -544,6 +545,26 @@ |
545 | 546 | !!end |
546 | 547 | |
547 | 548 | !! test |
| 549 | +External links: nowiki in URL link text (bug 6230) |
| 550 | +!!input |
| 551 | +[http://example.com/ <nowiki>''example site''</nowiki>] |
| 552 | +!! result |
| 553 | +<p><a href="http://example.com/" class='external text' title="http://example.com/" rel="nofollow">''example site''</a> |
| 554 | +</p> |
| 555 | +!! end |
| 556 | + |
| 557 | +!! test |
| 558 | +External links: newline forbidden in text (bug 6230 regression check) |
| 559 | +!! input |
| 560 | +[http://example.com/ first |
| 561 | +second] |
| 562 | +!! result |
| 563 | +<p>[<a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> first |
| 564 | +second] |
| 565 | +</p> |
| 566 | +!!end |
| 567 | + |
| 568 | +!! test |
548 | 569 | External image |
549 | 570 | !! input |
550 | 571 | External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -47,11 +47,12 @@ |
48 | 48 | define( 'HTTP_PROTOCOLS', 'http:\/\/|https:\/\/' ); |
49 | 49 | # Everything except bracket, space, or control characters |
50 | 50 | define( 'EXT_LINK_URL_CLASS', '[^][<>"\\x00-\\x20\\x7F]' ); |
51 | | -# Including space |
52 | | -define( 'EXT_LINK_TEXT_CLASS', '[^\]\\x00-\\x1F\\x7F]' ); |
| 51 | +# Including space, but excluding newlines |
| 52 | +define( 'EXT_LINK_TEXT_CLASS', '[^\]\\x0a\\x0d]' ); |
53 | 53 | define( 'EXT_IMAGE_FNAME_CLASS', '[A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]' ); |
54 | 54 | define( 'EXT_IMAGE_EXTENSIONS', 'gif|png|jpg|jpeg' ); |
55 | | -define( 'EXT_LINK_BRACKETED', '/\[(\b(' . wfUrlProtocols() . ')'.EXT_LINK_URL_CLASS.'+) *('.EXT_LINK_TEXT_CLASS.'*?)\]/S' ); |
| 55 | +define( 'EXT_LINK_BRACKETED', '/\[(\b(' . wfUrlProtocols() . ')'. |
| 56 | + EXT_LINK_URL_CLASS.'+) *('.EXT_LINK_TEXT_CLASS.'*?)\]/S' ); |
56 | 57 | define( 'EXT_IMAGE_REGEX', |
57 | 58 | '/^('.HTTP_PROTOCOLS.')'. # Protocol |
58 | 59 | '('.EXT_LINK_URL_CLASS.'+)\\/'. # Hostname and path |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -456,6 +456,7 @@ |
457 | 457 | doesn't forbid access. |
458 | 458 | * Regression fix: suppress warning about session failure when clicking to |
459 | 459 | edit with 'preview on first edit' enabled. |
| 460 | +* (bug 6230) Regression fix: <nowiki> in [URL link text] |
460 | 461 | |
461 | 462 | |
462 | 463 | == Compatibility == |