@@ -27,9 +27,9 @@ |
||
| 27 | 27 | |
| 28 | 28 | public static function renderJavascriptLink($anchor, $path, $attr = []) |
| 29 | 29 | { |
| 30 | - if (strpos($path, 'http://')===0) $path = '-'.substr($path, 7); |
|
| 31 | - elseif (strpos($path, 'https://')===0) $path = '_'.substr($path, 8); |
|
| 32 | - elseif (strpos($path, 'mailto:')===0) $path = '@'.substr($path, 7); |
|
| 30 | + if (strpos($path, 'http://') === 0) $path = '-'.substr($path, 7); |
|
| 31 | + elseif (strpos($path, 'https://') === 0) $path = '_'.substr($path, 8); |
|
| 32 | + elseif (strpos($path, 'mailto:') === 0) $path = '@'.substr($path, 7); |
|
| 33 | 33 | |
| 34 | 34 | return '<span'.self::mergeAndMapAttributes($attr, ['data-rot' => str_rot13($path)]).'>'.$anchor.'</span>'; |
| 35 | 35 | } |
@@ -27,9 +27,13 @@ |
||
| 27 | 27 | |
| 28 | 28 | public static function renderJavascriptLink($anchor, $path, $attr = []) |
| 29 | 29 | { |
| 30 | - if (strpos($path, 'http://')===0) $path = '-'.substr($path, 7); |
|
| 31 | - elseif (strpos($path, 'https://')===0) $path = '_'.substr($path, 8); |
|
| 32 | - elseif (strpos($path, 'mailto:')===0) $path = '@'.substr($path, 7); |
|
| 30 | + if (strpos($path, 'http://')===0) { |
|
| 31 | + $path = '-'.substr($path, 7); |
|
| 32 | + } elseif (strpos($path, 'https://')===0) { |
|
| 33 | + $path = '_'.substr($path, 8); |
|
| 34 | + } elseif (strpos($path, 'mailto:')===0) { |
|
| 35 | + $path = '@'.substr($path, 7); |
|
| 36 | + } |
|
| 33 | 37 | |
| 34 | 38 | return '<span'.self::mergeAndMapAttributes($attr, ['data-rot' => str_rot13($path)]).'>'.$anchor.'</span>'; |
| 35 | 39 | } |