Changeset 61188 in spip-zone
- Timestamp:
- May 11, 2012, 8:40:25 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/textwheel/inc/texte.php
r59031 r61188 172 172 } 173 173 174 define('_PROTEGE_BLOCS', ',<(html|code|cadre|frame|script) (\s[^>]*)?>(.*)</\1>,UimsS');174 define('_PROTEGE_BLOCS', ',<(html|code|cadre|frame|script)\b[^>]*>,UimsS'); 175 175 176 176 // - pour $source voir commentaire infra (echappe_retour) … … 183 183 184 184 if (($preg OR strpos($letexte,"<")!==false) 185 185 AND preg_match_all($preg ? $preg : _PROTEGE_BLOCS, $letexte, $matches, PREG_SET_ORDER)) 186 186 foreach ($matches as $regs) { 187 $init = $regs[0]; 188 $tag = $regs[1]; 189 $a = stripos($letexte, $tag); 190 $b = stripos($letexte, "</$tag>", $a); 191 if (!$b) next; 192 193 $regs[0] = substr($letexte, $a-1, $b - $a + strlen("</$tag>") + 1); 194 195 $regs[3] = substr($letexte, $a-1 + strlen($init), 196 $b - $a - strlen($init) + 1); 197 187 198 // echappements tels quels ? 188 199 if ($no_transform) {
Note: See TracChangeset
for help on using the changeset viewer.