Changeset 1480

Show
Ignore:
Timestamp:
05/27/06 12:31:19 (2 years ago)
Author:
mbonetti
Message:

Applying Jazz's patch for #411. Thanks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gregarius/extlib/kses.php

    r392 r1480  
    241241      case 2: # attribute value, a URL after href= for instance 
    242242 
    243         if (preg_match('/^"([^"]*)"(\s+|$|\/)/', $attr, $match)) 
     243        if (preg_match('/^"([^"]*)"(\s+|$|\/)?/', $attr, $match)) 
    244244         # "value" 
    245245        { 
     
    252252                         'vless' => 'n'); 
    253253          $working = 1; $mode = 0; 
    254           $attr = preg_replace('/^"[^"]*"(\s+|$|\/)/', '', $attr); 
     254          $attr = preg_replace('/^"[^"]*"(\s+|$|\/)?/', '', $attr); 
    255255          break; 
    256256        } 
    257257 
    258         if (preg_match("/^'([^']*)'(\s+|$|\/)/", $attr, $match)) 
     258        if (preg_match("/^'([^']*)'(\s+|$|\/)?/", $attr, $match)) 
    259259         # 'value' 
    260260        { 
     
    267267                         'vless' => 'n'); 
    268268          $working = 1; $mode = 0; 
    269           $attr = preg_replace("/^'[^']*'(\s+|$)/", '', $attr); 
     269          $attr = preg_replace("/^'[^']*'(\s+|$)?/", '', $attr); 
    270270          break; 
    271271        }