Skip to content

Commit

Permalink
Fix template parse regex to be compatible with strict PCRE2 rules for…
Browse files Browse the repository at this point in the history
… hyphen placement in a character class
  • Loading branch information
Ayesh authored and ikkez committed Sep 14, 2018
1 parent 38ce25b commit 5121138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function parse($text) {
// Build tree structure
for ($ptr=0,$w=5,$len=strlen($text),$tree=[],$tmp='';$ptr<$len;)
if (preg_match('/^(.{0,'.$w.'}?)<(\/?)(?:F3:)?'.
'('.$this->tags.')\b((?:\s+[\w-.:@!]+'.
'('.$this->tags.')\b((?:\s+[\w.:@!-]+'.
'(?:\h*=\h*(?:"(?:.*?)"|\'(?:.*?)\'))?|'.
'\h*\{\{.+?\}\})*)\h*(\/?)>/is',
substr($text,$ptr),$match)) {
Expand Down

0 comments on commit 5121138

Please sign in to comment.