Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -110,6 +110,7 @@ |
111 | 111 | $mobileViewUrl = $wgRequest->getRequestURL(); |
112 | 112 | $delimiter = ( strpos( $mobileViewUrl, "?" ) !== false ) ? "&" : "?"; |
113 | 113 | $mobileViewUrl .= $delimiter . 'useFormat=mobile'; |
| 114 | + $mobileViewUrl = htmlspecialchars( $mobileViewUrl ); |
114 | 115 | |
115 | 116 | $tpl->set('mobileview', "<a href='{$mobileViewUrl}'>{wfMsg( 'mobile-frontend-view' )}</a>"); |
116 | 117 | $footerlinks['places'][] = 'mobileview'; |
— | — | @@ -239,7 +240,7 @@ |
240 | 241 | // ajax_support_javascript |
241 | 242 | // html_preferred_dtd |
242 | 243 | |
243 | | - // Determine |
| 244 | + // Determine |
244 | 245 | |
245 | 246 | if (self::$useFormat === 'mobile' || |
246 | 247 | self::$useFormat === 'mobile-wap' ) { |
— | — | @@ -517,7 +518,7 @@ |
518 | 519 | // TODO: Content transformations required |
519 | 520 | // WML Validator: |
520 | 521 | // http://validator.w3.org |
521 | | - // |
| 522 | + // |
522 | 523 | // div -> p |
523 | 524 | // no style, no class, no h1-h6, sup, sub, ol, ul, li etc. |
524 | 525 | // table requires "columns" property |
Index: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | $mobileViewUrl = $wgRequest->getRequestURL(); |
112 | 112 | $delimiter = ( strpos( $mobileViewUrl, "?" ) !== false ) ? "&" : "?"; |
113 | 113 | $mobileViewUrl .= $delimiter . 'useFormat=mobile'; |
114 | | - $mobileViewUrl = urlencode( $mobileViewUrl ); |
| 114 | + $mobileViewUrl = htmlspecialchars( $mobileViewUrl ); |
115 | 115 | |
116 | 116 | $tpl->set('mobileview', "<a href='{$mobileViewUrl}'>Mobile View</a>"); |
117 | 117 | $footerlinks['places'][] = 'mobileview'; |