Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-8879

ATOM feed not W3C Valid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.7
    • 3.0.6
    • Other
    • None
    • PHP Environment: 5.2.9
      Database: MySQL(i)

      I noticed that my ATOM feeds weren't valid. I had a hard time finding out what exactly it was cause I couldn't seem to find the fault.

      It was an invisible character, particularly \x03 .

      The fix I used was to just remove that character from the feed with the following....
      // Remove ASCII character  aka \x03 aka ETX (End of TeXt)
      $content = str_replace("\x03",'', $content);

      But then I noticed a little further down from where I placed this was....
      // Other control characters
      // $content = preg_replace('#(?:[\x00-\x1F\x7F]|(?:\xC2[\x80-\x9F]))#', '', $content);

      So I uncommented it as follows.....
      // Other control characters
      $content = preg_replace('#(?:[\x00-\x1F\x7F]|(?:\xC2[\x80-\x9F]))#', '', $content);

      And that worked.

      I wasn't sure if this is intentionally commented or whether this is considered a bug or not so I decided to post it.

      Typo

            bantu Andreas Fischer [X] (Inactive)
            typos typos
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: