WordPress.org

Ready to get started?Download WordPress

Forums

looks like a bug... (5 posts)

  1. andorn
    Member
    Posted 8 years ago #

    ... this line in functions-formatting.php:
    elseif (strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd' || strstr($curl, '<style') || strstr($curl, '<script')))

    is it a typo or i just misunderstand something?

  2. katesgasis
    Member
    Posted 8 years ago #

    It's not a bug. It's looking for a match.

  3. andorn
    Member
    Posted 8 years ago #

    mmm...
    but why there is no brace after strstr($curl, '<kbd'?
    strstr is (string,string) function, not (string,bool) so i'm surprised

  4. katesgasis
    Member
    Posted 8 years ago #

    Because it only searches for something that starts with "<kbd" in the variable $curl. If found, the string starting from '<kbd to the end of $curl will be returned.

  5. andorn
    Member
    Posted 8 years ago #

    As i understand, here we try to catch "<kbd" tag. So our function have to return something eq to true on "<kbd foobar", is it?

    strstr($curl,'<kbd') works like this, but strstr($curl,'<kbd' || ... is not.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.