mediawiki-extensions-Visual.../modules
Roan Kattouw 514039b2ba Clean up incorrect use of regular expressions in CategoryInputWidget
getLookupMenuItemsFromData() constructed a regex from user input
without escaping. I don't *think* there are any injection
vulnerabilities here but at the very least it triggers exceptions
when the input is, say, a backslash. Instead, use .lastIndexOf() which
allows us to efficiently check whether a string starts with a certain
prefix.

getLookupCacheItemFromData() was stripping out the Category: prefix
using a regex that hardcoded Category: (so failed to detect localized
prefixes) and used global replacement, which meant that strings with
multiple occurrences of 'Category:' were handled incorrectly. Instead,
use mw.Title to strip the prefix. Also move away from .map() because we
may need to drop a result if it doesn't pass mw.Title validation.

this.categoryPrefix still has a few legitimate uses left, so keep it
around but set it to the localized namespace prefix rather than Category:

Change-Id: I6547f9df2e94fe81f6aefb9286e547425137344b
2013-06-11 12:25:41 -07:00
..
jquery Merge "Implement new browser compatibility checks" 2013-06-05 12:32:56 +00:00
oojs oojs: Integrate with OOJS v1.0.0 2013-06-06 17:29:55 +02:00
qunit Upstream: Update QUnit from v1.10.0 to v1.11.0 2013-02-19 19:50:02 +01:00
rangy Convert from DOS line endings (CRLF) to Unix ones (LF) 2013-05-25 23:51:21 +02:00
unicodejs Match non-BMP characters in wordbreak regexes 2013-06-10 23:16:23 +01:00
ve Clean up incorrect use of regular expressions in CategoryInputWidget 2013-06-11 12:25:41 -07:00