It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I6f59febaf8fc96e80f8cfc11f4356283f461142a
Apparently it is possible for Parser::mParserOptions
to not be set in some cases. I'll try again later.
This reverts commit bda74bff6e.
Bug: T146433
Change-Id: Idb6d1b20995d5f86b712abb386ab987356c4f560
wfEscapeWikiText() used $wgEnableMagicLinks, but that could result in an
inconsistency when something modifies the magic link related
ParserOptions.
In general, most uses of wfEscapeWikiText() are in parser functions or
when message parsing, so the Parser is a logical place for it.
A future patch will make it easy to use Parser::escapeWikitext() in
message parameters.
Change-Id: I0fd4d5c135541971b1384a20328f1302b03d715f
Revision::getSize() might return null when the revision.rev_len field
is null. That should never happen normally (the field should get
backfilled as part of the update process), but we've also had a bug
where rev_len was not being recorded for empty pages (see T135414 for
details). It's saner to return a number here rather than empty string,
and 0 should actually be correct for all pages affected by that issue.
Bug: T20998
Change-Id: Ie12f0be24f00aaf8b90b25c4921a97df3b789369
Ignored restricted DISPLAYTITLE warning isn't really relevant for the casual reader
so don't show it in the page output. Instead show it above the edit box.
Bug: T135949
Change-Id: I009dd865bec7b6e3a7492c49db97074483f93ee4
Added to "Pages with ignored display titles" category
(message key: "restricted-displaytitle-ignored")
Follow up to I6ae6d5d0e567ba9c86e46c32240ee51a2ca5d8d1
Bug: T135949
Change-Id: I9e0f8b1e3d39a62c13191bea6734fb136e976e0c
If a page contains a call to DISPLAYTITLE that is ignored because of
$wgRestrictDisplayTitle, output a warning.
Bug: 26546
Change-Id: I6ae6d5d0e567ba9c86e46c32240ee51a2ca5d8d1
This adds a magic word to get the protection expiry for a page for a
given action.
Usage is {{PROTECTIONEXPIRY:action}}.
Bug: T19354
Change-Id: Ia1a20e313781789480dc082bdc7f585c4f0e28df
This doesn't fix all the files under includes/parser -
some of them deserve their own patches.
Bug: T102614
Change-Id: I2fcbc19ee337e1b7db4635b5e5f324c651b4d144
* Urlencode and extension tags don't play nice. The current behaviour
is pretty broken. For example,
{{urlencode:<pre id="one">two</pre>}}
outputs
<pre id="one">two</pre>
which isn't exactly urlencoded.
* Just drop the unexpanded content; anything more seems unsafe. There's
precedent for this already in anchorencode.
* Noticed in the infobox caption for enwiki/%22F%22_Is_for_Fugitive
Change-Id: I0ec5d2fdeb71f762036464f65029afd029e8b4a1
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
When #tag is given a tag that it doesn't recognize, re-emit it as a
regular tag instead of giving an error. This allows for it to be used with
transparent tags and HTML tags.
Change-Id: I0ceee8a4fdaf2d3142054a108f445ff06597c31a
Add Parser::fetchCurrentRevisionOfTitle(). By default, this just calls
Revision::newFromTitle, but a callback can be set in ParserOptions that
will override it. Anything that runs as part of a parse should use this
wherever possible.
Bug: 70495
Change-Id: I521f1f68ad819cf0f37e63240806f10c1cceef9c
* Previously the cache size was unbounded and leaky
* Also made MapCacheLRU handle null values properly
Change-Id: Ia02258cf051e1ccf11457c758741b8c7922afe89
Implement the same duplicate-warning logic for DISPLAYTITLE that
DEFAULTSORT currently uses, to catch cases where a newer call overrides an
older one.
Bug: 50449
Change-Id: Ibce776d019aab07fb88fbb89afc5340300735405
We currently allow <ruby>, <rt>, <rb>, and <rp> but not the W3C HTML5
<rtc> element. Fix that.
(Note that <rb> and <rtc> are new additions to HTML5 which currently
appear in the W3C but not the WHATWG version of the HTML5 spec.
Support for these has already been merged in gecko and webkit and
the editor plans to update the WHATWG spec.)
Bug: 67042
Change-Id: I8c0e65d782b6d23057a9723b87323b28e8bf8852
Remaining are the classes containing underscores and possibly a few other
issues that will be addressed soonish.
Change-Id: Icf56374c71afc134420ebbcfecf12dcb29dc9564
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I49f8f48b521878de7abd9cc40efdeff6cf9a37e0
- Added spaces after if/foreach/catch
- Added new line before end of file
- Added or removed spaces before/after parenthesis, comma
- Added spaces around string concat
Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f
and return values accordingly to htmlspecialchars()
PHP Warning: htmlspecialchars() expects parameter 1 to be string,
array given in CoreParserFunctions.php on line 212
Checked for the return value of urlFunction in localurle() and fullurle()
function
Bug: 59881
Change-Id: I7ae092f89b9cfbbe91d1883c2182ca5907825ba4
Makes checks against the fragment easier to read and all the same.
At the moment some using strval, some use type safe comparsion.
Change-Id: I27d9c3e40e6de6800f4488de167cf06e83c88ce6
When a page's cascading protection sources have already been loaded, don't
count CASCADINGSOURCES as expensive.
Change-Id: Ia9d25790c534414f637f85d6a3fc4f2c1c0de790