Last modified: 2014-02-12 23:35:36 UTC
The parser (or rather the sanitizer) should allow the <noscript> tag and output it in HTML if it is present in wiki text. Use cases: <noscript> You have to turn on JS in your browser to be able to sort this table. </noscript> {| class="wikitable sortable" <!-- ... --> |} <noscript> [[#after-long-block|Skip to after the block]] </noscript> <div class="mw-collapsible mw-collapsed"> Here comes much data, it is hidden by default if JavaScript is enabled. ... </div> <div id="after-long-block"></div>
Assuming the contents of the <noscript> tags are still run through the parser/sanitizer, this should probably be fine. Are there any security concerns or issues to look out for here that you're aware of? If not, this bug can likely be marked with the "easy" keyword.
https://gerrit.wikimedia.org/r/#/c/53529/
Patch in Gerrit needs review (and testing).
I'm not convinced that this is needed or wanted, and <noscript> could be confusing if some content was only seen by some readers (and web spiders). Consider me neutral on the matter. And this is easy to work around – we already have 'client-js' and 'client-nojs' classes on the <body> element, so you could do this with one CSS rule in [[MediaWiki:Common.css]]: .client-js .noscript { display: none; } And use the following in pages: <div class="noscript"> You have to turn on JS in your browser to be able to sort this table. </div>
The <noscript> element accepts the global attributes in HTML. These are missing from the patch (as currently written, all attributes would be stripped; see also bug 55582).