Page MenuHomePhabricator

#iferror should catch more errors
Closed, ResolvedPublic

Description

Author: rene.kijewski

Description:
Currently #iferror catches errors if and only if it is the only class applied to a (strong|span|p|div). I'd propose to change ParserFunctions.php's line 136 to test the string against

<(?:strong|span|p|div)\s[^>]*?class="(?:[^" ]* +)*error(?: +[^" ]*)*"

so any amount of other classes may precede or succede /error/.


Version: unspecified
Severity: normal

Details

Reference
bz15730

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:23 PM
bzimport added a project: ParserFunctions.
bzimport set Reference to bz15730.
bzimport added a subscriber: Unknown Object (MLST).

Applied with r41881 with

<(?:strong|span|p|div)\s(?:[^\s>]*\s+)*?class="(?:[^"\s>]*\s+)*?error(?:\s[^">]*)?"

from my talk page: http://de.wikipedia.org/wiki/Benutzer_Diskussion:Raymond/Archiv_2008-2#.23iferror