Make WordPress Core

Changeset 13561


Ignore:
Timestamp:
03/02/2010 10:11:08 PM (15 years ago)
Author:
westi
Message:

Improve kses handling of attributes in valid XHTML self closed img tags. Fixes #12394 props dougal.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/kses.php

    r13382 r13561  
    539539
    540540    $xhtml_slash = '';
    541     if (preg_match('%\s/\s*$%', $attr))
     541    if (preg_match('%\s*/\s*$%', $attr))
    542542        $xhtml_slash = ' /';
    543543
     
    665665            case 2 : # attribute value, a URL after href= for instance
    666666
    667                 if (preg_match('/^"([^"]*)"(\s+|$)/', $attr, $match))
     667                if (preg_match('%^"([^"]*)"(\s+|/?$)%', $attr, $match))
    668668                    # "value"
    669669                    {
     
    681681                }
    682682
    683                 if (preg_match("/^'([^']*)'(\s+|$)/", $attr, $match))
     683                if (preg_match("%^'([^']*)'(\s+|/?$)%", $attr, $match))
    684684                    # 'value'
    685685                    {
     
    697697                }
    698698
    699                 if (preg_match("%^([^\s\"']+)(\s+|$)%", $attr, $match))
     699                if (preg_match("%^([^\s\"']+)(\s+|/?$)%", $attr, $match))
    700700                    # value
    701701                    {
Note: See TracChangeset for help on using the changeset viewer.