Improves and corrections

felipensp - October 13, 2007 - 12:39
Project:Embed filter
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:felipensp
Status:postponed (maintainer needs more info)
Description

Hi, my suggestions for the project.

In line 119:
$whitelist = array_filter(split("[\n|\r]", $var), 'trim');

The caracter | dont's separator of caracters. Then, itself is includes.

Example:

felipe@bl4ck:~$ php -r "print_r(split('[\n|\r]', 'a|b'));"
Array
(
    [0] => a
    [1] => b
)

That's expected?

In line 294:
    $pattern = '@( on[^=]+?=([\'"])([^\\2]+?)\\2)?@i';

It's don't works were expected... See:
preg_match('/([\'"])[^\1]+\1/', "''\"\"'", $m); print_r($m);

Documentation:

Outside a character class, a backslash followed by a digit greater than 0 (and possibly further digits) is a back reference to a capturing subpattern earlier (i.e. to its left) in the pattern, provided there have been that many previous capturing left parentheses.

http://br2.php.net/manual/en/reference.pcre.pattern.syntax.php

Regards,
Felipe.

#1

KarenS - September 27, 2009 - 11:15
Status:active» postponed (maintainer needs more info)

Sorry, I don't understand the issue and don't know if it still applies.

 
 

Drupal is a registered trademark of Dries Buytaert.