webplatform / mediawiki

WebPlaform Docs’ MediaWiki micro-extensions and skin
10 stars 4 forks source link

Make sure all template links are properly escaped #6

Open renoirb opened 10 years ago

renoirb commented 10 years ago

There are many issues where the & aren't URL encoded.

For example, at: https://github.com/webplatform/mediawiki/blob/master/skins/WebPlatform.php#L317

Would be better to replace with something similar to:

                $tagAttribs['href'] = $item['links'][0]['href'];
                $tagAttribs['class'] = $item['links'][0]['class'];
                $tagAttribs['id'] = $item['links'][0]['single-id'];
                echo Html::rawElement(
                    'a',
                    $tagAttribs,
                    $item['links'][0]['text']
                );