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

HTML pasted into literal ends up outside literal tag

    XMLWordPrintable

    Details

      Description

      With CHROME BROWSER, try to paste some HTML text inside a literal tag. The text will be pasted outside the literal tag.

      STEPS TO REPRODUCE

      1. Edit content.ini.append.php and add the following code.
        [literal]
        AvailableClasses[]
        AvailableClasses[]=html
        CustomAttributes[]
        
      2. Create a new article and click the button to add a new literal tag.
      3. Yet in the literal tag window, select HTML class and click OK button.
      4. You will see a purple line in the body of the article. Click it to make sure it has the focus.
      5. Copy the code below from a plain text source and paste it inside the literal tag
        <div>
        <table>
        <tr>
        <td><b>Head #001</b></td>
        <td><b>Head #002</b></td>
        </tr>
        <tr>
        <td><b>Test #001</b></td>
        <td><b>Test #002</b></td>
        </tr>
        </table>
        </div>
        
      6. The code was paste outside the literal tag, as you can confirm disabling the online editor.
        <literal class="html"> </literal>
        
        &lt;div&gt;
        &lt;table&gt;
        &lt;tr&gt;
        &lt;td&gt;&lt;b&gt;Head #001&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;&lt;b&gt;Head #002&lt;/b&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
        &lt;td&gt;&lt;b&gt;Test #001&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;&lt;b&gt;Test #002&lt;/b&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;/table&gt;
        &lt;/div&gt;
        

      Please notice that, if the html code was copied from a browser instead plain text, the results will be slightly different: the literal tag will be duplicated, without the HTML class, and the code will be pasted inside this second literal tag

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Time Spent - 4 days, 4 hours, 45 minutes Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - 4 days, 4 hours, 45 minutes Remaining Estimate - 4 hours
                  4d 4h 45m