Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -803,7 +803,7 @@ |
804 | 804 | $segmentsCount = count( $segments ); |
805 | 805 | $card .= "<p>" . $idx . "/" . $segmentsCount . "</p>"; |
806 | 806 | |
807 | | - $useFormatParam = ( isset( self::$useFormat ) ) ? '&' . 'useformat=' . self::$useFormat : ''; |
| 807 | + $useFormatParam = ( isset( self::$useFormat ) ) ? '&' . 'useformat=' . self::$useFormat : ''; |
808 | 808 | |
809 | 809 | // Title::getLocalUrl doesn't work at this point since PHP 5.1.x, all objects have their destructors called |
810 | 810 | // before the output buffer callback function executes. |
— | — | @@ -817,7 +817,7 @@ |
818 | 818 | $delimiter = ( !empty( $qs ) ) ? '?' : ''; |
819 | 819 | $basePageParts = wfParseUrl( self::$currentURL ); |
820 | 820 | $basePage = $basePageParts['scheme'] . $basePageParts['delimiter'] . $basePageParts['host'] . $basePageParts['path'] . $delimiter . $qs; |
821 | | - $appendDelimiter = ( $delimiter === '?' ) ? '&' : '?'; |
| 821 | + $appendDelimiter = ( $delimiter === '?' ) ? '&' : '?'; |
822 | 822 | |
823 | 823 | if ( $idx < $segmentsCount ) { |
824 | 824 | $card .= "<p><a href=\"{$basePage}{$appendDelimiter}seg={$idx}{$useFormatParam}\">" . self::$messages['mobile-frontend-wml-continue'] . "</a></p>"; |
— | — | @@ -1032,6 +1032,12 @@ |
1033 | 1033 | // Add segmentation markers |
1034 | 1034 | $contentHtml = $this->headingTransform( $contentHtml ); |
1035 | 1035 | |
| 1036 | + // Content removal for WML rendering |
| 1037 | + $elements = array( 'span', 'div', 'sup', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'sup', 'sub' ); |
| 1038 | + foreach ( $elements as $element ) { |
| 1039 | + $contentHtml = preg_replace( '#</?' . $element . '[^>]*>#is', '', $contentHtml ); |
| 1040 | + } |
| 1041 | + |
1036 | 1042 | // Content wrapping |
1037 | 1043 | $contentHtml = $this->createWMLCard( $contentHtml ); |
1038 | 1044 | require( 'views/layout/application.wml.php' ); |
Index: trunk/extensions/MobileFrontend/views/layout/application.wml.php |
— | — | @@ -6,13 +6,9 @@ |
7 | 7 | |
8 | 8 | $applicationHtml = <<<EOT |
9 | 9 | <?xml version='1.0' encoding='utf-8' ?> |
10 | | - <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> |
| 10 | + <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" |
| 11 | + "http://www.wapforum.org/DTD/wml13.dtd"> |
11 | 12 | <wml xml:lang="{$code}" dir="{$dir}"> |
12 | | - <head> |
13 | | - <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /> |
14 | | - <meta name="character-set=utf-8" content="charset"/> |
15 | | - <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/> |
16 | | - </head> |
17 | 13 | <template> |
18 | 14 | <do name="home" type="options" label="{$homeButton}" > |
19 | 15 | <go href="{$mainPageUrl}"/> |