Parsing stray greater/less than symbols in HTML

    Date: 06/02/10 (PHP Community)    Keywords: html

    $str = "

    This is a test. This test is > that test, but is less than < the other test. The previous test may be

    [Error: Irreparable invalid markup ('') in entry. Owner must fix manually. Raw contents below.]

    $str = "

    This is a test. This test is > that test, but is less than < the other test. The previous test may be than the third test. The fourth test may be < the first, but > than the last. This is the end of the test string.

    ";


    Need to identify and convert the legit, non HTML greater/less than signs to ASCII.. I'm running out of ideas, especially with the substrings:

    The previous test may be < the second test, but is likely > than the third test.
    and
    The fourth test may be < the first, but > than the last.


    Anyone have a suggestion or hint on how to accomplish this?

    Source: https://php.livejournal.com/678754.html

« Hmm... || Do x to items 1-7, then y... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home