See also https://bugzilla.wikimedia.org/show_bug.cgi?id=34763
I try a concise description of a not-so-easy-to-describe problem.
Background: The RSS extension has some code built-in which does some parsing internally (rationale: because it uses two templates where users or admins can configure the actual feed layout on a wiki page).
My problem while working to find a final solution for bug34763 is: ==============================================
After encapsulating some sanitized HTML text (I use $parser->insertStripItem() as suggested by bawollf) my function Parser hook function renderFeed returns with
return $parser->recursiveTagParse( $renderedFeed );
As an alternative I already tried using sandboxParse as described on https://www.mediawiki.org/wiki/Manual:Special_pages#workaround_.231 but it has the same effect.
Typical (valid und wanted) content of $renderedFeed at that moment is
{{MediaWiki:Rss-feed | title = Test 3 | link = https://www.example.com/User:WikiSysop | date = (2012-02-22 22:09:00) | author = WikiSysop | description = UNIQ67172f774bad4ca9-item-1--QINU }} {{MediaWiki:Rss-feed | title = Test 4 | link = https://www.example2.com/User:Alice | date = (2012-02-21 22:09:00) | author = Alice | description = UNIQ67172f774bad1234-item-2--QINU }} ...
The recursiveTagParse (or sandboxParse) above parses the templates (here: MediaWiki:Rss-feed) (ok) but also _un_strips the formerly intentionally encapsulated HTML. (not ok)
The early unstripping is unwanted, because the (sanitized) HTML should be rendered later, at the place where the MediaWiki:Rss-feed template wants to have it. The final stripping should take place just when the wiki page is finally rendered.
My questions: ========== 1. Is there a way to use recursiveTagParse so that it parses-out anything but does not "unstripGeneral()" the encapsulated items ? 2. Do I have to use another hook in addition ? 3. Your feedback is appreciated on https://bugzilla.wikimedia.org/show_bug.cgi?id=34763
Tom
wikitech-l@lists.wikimedia.org