Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-8879

ATOM feed not W3C Valid

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • 3.0.6
    • 3.0.7
    • Other
    • None
    • PHP Environment: 5.2.9
      Database: MySQL(i)

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: