Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-17555

First space in paragraph is saved as nbsp

    XMLWordPrintable

Details

    Description

      When a paragraph starts with a single space and then some text, the space is saved as an nbsp, though a normal space is enough.

      This bit in ezoexmlinput.php seems related, but removing it does not change behavior, so perhaps not.

      if ( $tagContent[0] === ' ' && !$tag->previousSibling )//- Fixed "first space in paragraph" issue (ezdhtml rev.12246)
      {
          $tagContent[0] = ';';
          $tagContent = '&nbsp' . $tagContent;
      }
      
      Steps to reproduce
      • Edit an ezxmltext attribute with OE
      • Make a paragraph, enter a space and then some text
      • See in the database that the paragraph is saved as
        <paragraph>&amp;nbsp;some text</paragraph>
        
      • Expected:
        <paragraph> some text</paragraph>
        

      Attachments

        Activity

          People

            e8318ba6-e4ae-477c-9116-36c073bd11a3@accounts.ibexa.co Patrick Allaert
            gl gl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: