https://bugzilla.wikimedia.org/show_bug.cgi?id=32858

--- Comment #22 from DavidL <lamb...@orange.fr> 2011-12-23 19:21:34 UTC ---
(In reply to comment #21)
> (In reply to comment #20)
> > No, putting backslash is not javascript !
> 
> Are you listening to yourself? Using a backslash in strings to escape
> particular characters so they aren't incorrectly parsed is done by just about
> everybody who writes JS, including those not writing it on MediaWiki
> installations - it's the simplest and most obvious way to prevent unwanted
> parsing by the JS engine running the script. Using the backslash to prevent
> unwanted parsing by MediaWiki is a natural and obvious extension of this
> built-in syntax without any downsides; every JS programmer immediately
> recognises what's going on when they see the backslash, even if they don't
> understand the reasoning for its being there. How exactly, then, is "putting
> backslash ... not javascript"?

I means that the following is valid Javascript :
  var str = "{{subst:template}}";
Why will this code need escaping at all as Javascript is expected ?

> 
> (In reply to comment #18)
> > 3 - Tracking of users seems only useful for the total usage count only, not 
> > for
> > the user names.
> 
> Michael M. gave an explicit counterexample to this in comment 17: 'Just this
> week I updated one of my scripts in a not-100-%-backwardscompatible way, so I
> had to inform the users of my script about the changes. With the "What links
> here" function this was no problem.' If the script tracking only listed the
> number of users with the script installed, that notification would have been
> impossible.

Then use special MediaWiki feature instead of special Wiki+Javascript syntax.
Wiki pages are wiki, Javascript pages should be Javascript.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to