Last modified: 2014-02-12 23:35:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47731, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45731 - Allow <noscript> tag
Allow <noscript> tag
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: JuneHyeon Bae (devunt)
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-05 10:48 UTC by Michael M.
Modified: 2014-02-12 23:35 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael M. 2013-03-05 10:48:07 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>
Comment 1 MZMcBride 2013-03-06 08:58:18 UTC
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.
Comment 2 JuneHyeon Bae (devunt) 2013-03-13 06:07:39 UTC
https://gerrit.wikimedia.org/r/#/c/53529/
Comment 3 Andre Klapper 2013-07-25 08:19:23 UTC
Patch in Gerrit needs review (and testing).
Comment 4 Bartosz Dziewoński 2013-07-25 20:49:36 UTC
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>
Comment 5 entlinkt 2013-10-10 20:38:48 UTC
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).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links