Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | |
70 | 70 | # Constants needed for external link processing |
71 | 71 | # Everything except bracket, space, or control characters |
72 | | - const EXT_LINK_URL_CLASS = '(?:[^\]\[<>"\\x00-\\x20\\x7F]|(?:\[\]))'; |
| 72 | + const EXT_LINK_URL_CLASS = '[^][<>"\\x00-\\x20\\x7F]'; |
73 | 73 | const EXT_IMAGE_REGEX = '/^(http:\/\/|https:\/\/)([^][<>"\\x00-\\x20\\x7F]+) |
74 | 74 | \\/([A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]+)\\.((?i)gif|png|jpg|jpeg)$/Sx'; |
75 | 75 | |
— | — | @@ -184,7 +184,7 @@ |
185 | 185 | $this->mConf = $conf; |
186 | 186 | $this->mUrlProtocols = wfUrlProtocols(); |
187 | 187 | $this->mExtLinkBracketedRegex = '/\[(\b(' . wfUrlProtocols() . ')'. |
188 | | - '(?:[^\]\[<>"\x00-\x20\x7F]|\[\])+) *([^\]\\x00-\\x08\\x0a-\\x1F]*?)\]/S'; |
| 188 | + '[^][<>"\\x00-\\x20\\x7F]+) *([^\]\\x00-\\x08\\x0a-\\x1F]*?)\]/S'; |
189 | 189 | if ( isset( $conf['preprocessorClass'] ) ) { |
190 | 190 | $this->mPreprocessorClass = $conf['preprocessorClass']; |
191 | 191 | } elseif ( extension_loaded( 'domxml' ) ) { |