(bug 35315) Detect circular references in strip tags
authorTim Starling <tstarling@wikimedia.org>
Mon, 23 Apr 2012 02:03:02 +0000 (12:03 +1000)
committerTim Starling <tstarling@wikimedia.org>
Tue, 8 May 2012 04:36:32 +0000 (14:36 +1000)
commit3905be18fbd6d233f1517d6e7612a6acfb91fa82
tree76868ef009caf7831ae2205dd4ddbad437a08aab
parentf8e03276562b537b1efabcdf956c573667dccb94
(bug 35315) Detect circular references in strip tags

Explicitly detect circular references in strip tags and break the loop,
similar to how we deal with circular references in templates. This is
necessary to support Scribunto since we imagine we will provide an API
that allows strip markers to be forged.

The recursion depth limit is a consequence of changing the algorithm
from iterative to recursive, it's required to protect the stack against
deeply nested #tag invocations.

Change-Id: Icc8dc4aedbced55ad75b3b5a5429a376d06d9b31
includes/parser/StripState.php
languages/messages/MessagesEn.php