|
@@ 2183-2186 (lines=4) @@
|
| 2180 |
|
$m[3] = substr( $m[3], 1 ); |
| 2181 |
|
} |
| 2182 |
|
# fix up urlencoded title texts |
| 2183 |
|
if ( strpos( $m[1], '%' ) !== false ) { |
| 2184 |
|
# Should anchors '#' also be rejected? |
| 2185 |
|
$m[1] = str_replace( [ '<', '>' ], [ '<', '>' ], rawurldecode( $m[1] ) ); |
| 2186 |
|
} |
| 2187 |
|
$trail = $m[3]; |
| 2188 |
|
} elseif ( preg_match( $e1_img, $line, $m ) ) { |
| 2189 |
|
# Invalid, but might be an image with a link in its caption |
|
@@ 2192-2194 (lines=3) @@
|
| 2189 |
|
# Invalid, but might be an image with a link in its caption |
| 2190 |
|
$might_be_img = true; |
| 2191 |
|
$text = $m[2]; |
| 2192 |
|
if ( strpos( $m[1], '%' ) !== false ) { |
| 2193 |
|
$m[1] = str_replace( [ '<', '>' ], [ '<', '>' ], rawurldecode( $m[1] ) ); |
| 2194 |
|
} |
| 2195 |
|
$trail = ""; |
| 2196 |
|
} else { # Invalid form; output directly |
| 2197 |
|
$s .= $prefix . '[[' . $line; |