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

ezxmltext -> richtext conversion : Invalid xhtml attribute values

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Low Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Upgrading
    • Labels:
      None

      Description

      Legacy ( eZ Publish ) do not perform much validation of html attributes ( ie. xml attribuites with the xhtml namespace ). As a consequence, user may experience validation errors when converting ezxmltext to richtext and displays content in eZ Platform.

      A example of ezxmltext which will be rendered into invalid xhtml is here (xhtml:colspan contains invalid value):

      <?xml version="1.0" encoding="utf-8"?>
      <section
              xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
              xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
              xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
          <paragraph
                  xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">
              <table width="100%">
                  <tr>
                      <td xhtml:colspan="{sub($span1,1)}">
                          <paragraph>aaa</paragraph>
                      </td>
                  </tr>
              </table>
          </paragraph>
      </section>
      

      Even though the rendered output produced by eZ Publish will be invalid, browsers will cope with it just fine. eZ Platform will on the other hand validate the output and show error messages. Also, the conversion script will complain about such errors, but it will be vague in the hinting of what the validation problem is.

        Issue Links

          Activity

          Hide
          Vidar Langseid added a comment - - edited

          Another

          <?xml version="1.0" encoding="utf-8"?>
          <section
                  xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
                  xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
                  xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
              <paragraph
                      xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/" ez-temporary="1">
                  <table width="396" border="0">
                      <tr>
                          <td xhtml:width="100" align="center" custom:valign="center"/>
                      </tr>
                  </table>
              </paragraph>
          </section>
          

          custom:valign could be top, middle, bottom, baseline

          Show
          Vidar Langseid added a comment - - edited Another <?xml version="1.0" encoding="utf-8"?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"> <paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/" ez-temporary="1"> <table width="396" border="0"> <tr> <td xhtml:width="100" align="center" custom:valign="center"/> </tr> </table> </paragraph> </section> custom:valign could be top, middle, bottom, baseline
          Hide
          Vidar Langseid added a comment -

          Another :

          <?xml version="1.0" encoding="utf-8"?>
          <section
                  xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
                  xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
                  xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
              <paragraph
                      xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/" ez-temporary="1">
                  <table border="1">
                      <tr>
                          <td align="middle">
                              <paragraph>foobar</paragraph>
                          </td>
                      </tr>
                  </table>
              </paragraph>
          </section>
          

          align may be left, right, center, justify, char

          Show
          Vidar Langseid added a comment - Another : <?xml version="1.0" encoding="utf-8"?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"> <paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/" ez-temporary="1"> <table border="1"> <tr> <td align="middle"> <paragraph>foobar</paragraph> </td> </tr> </table> </paragraph> </section> align may be left, right, center, justify, char
          Hide
          Vidar Langseid added a comment -

          Another:

          <?xml version="1.0" encoding="utf-8"?>
          <section
                  xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
                  xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
                  xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
                  <paragraph
                          xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">
                      <custom name="countdown" custom:title="foobar" custom:align="none"/>
                  </paragraph>
          </section>
          

          align="none" ....

          Show
          Vidar Langseid added a comment - Another: <?xml version="1.0" encoding="utf-8"?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"> <paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/"> <custom name="countdown" custom:title="foobar" custom:align="none"/> </paragraph> </section> align="none" ....

            People

            • Assignee:
              Unassigned
              Reporter:
              Vidar Langseid
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: