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

HTML pasted into literal ends up outside literal tag

    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

        Issue Links

          Activity

          Hide
          Damien Pobel (Inactive) added a comment -

          The update to TinyMCE 3.5.10 (EZP-22092) fixes the issue.

          Show
          Damien Pobel (Inactive) added a comment - The update to TinyMCE 3.5.10 ( EZP-22092 ) fixes the issue.
          Hide
          Paulo Nunes (Inactive) added a comment - - edited

          Hi,

          eZ Publish 5.0:
          Using the patch provided in this issue to upgrade TinyMCE didn't solve the issue.

          Edit:
          I'm using chrome version 32.0.1700.107 and I couldn't exactly reproduce the issue described, but pretty much close.
          If I copy the referred text from a text editor, the issue is reproducible and remain.
          If I copy the code form the browser and paste it on the literal tag, the text is pasted outside the literal tag, but within a literal tag itself without the html class.
          The result i have is:

          <literal class="html"> </literal>
          <literal><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></literal>
          

          NOTE: using the not yet released service pack EZSP-011-EZP5.0 (see https://jira.ez.no/browse/QA-282 ) seems to solve the problem. So, some fix in there seems to solve the problem. I'll send this issue back to inpuQ in case development team want's to give a second look. If not, i suggest this issue status to pend the approval and release of EZSP-011-EZP5.0.-

          eZ Publish 5.1:
          EZSP-007-EZP5.1, distributed Feb 17th 2014 (today) seems to resolve the issue. At least in the form I described above.
          Without this service pack, the 5.1 has the same behaviour described above for ezp5.0-
          Edit: EZSP-007-EZP5.1 didn't solve the problem as I tough before. If we paste the referred code copying from a text editor, the literal tag disappear. If we paste the referred code copying from the browser, the HTML class is being stripped from the literal tag.

          eZ Publish 5.2:
          EZSP-004-EZP5.0, distributed Feb 17th 2014 (today) seems to resolve the issue.
          Without this service pack, the 5.2 has the same behaviour described above for ezp5.0
          Edit: EZSP-004-EZP5.0 also didn't solve the problem as I tough before. As from ezp 5.1, if we paste the referred code copying from a text editor, the literal tag disappear. If we paste the referred code copying from the browser, the HTML class is being stripped from the literal tag.

          Show
          Paulo Nunes (Inactive) added a comment - - edited Hi, eZ Publish 5.0: Using the patch provided in this issue to upgrade TinyMCE didn't solve the issue. Edit: I'm using chrome version 32.0.1700.107 and I couldn't exactly reproduce the issue described, but pretty much close. If I copy the referred text from a text editor, the issue is reproducible and remain. If I copy the code form the browser and paste it on the literal tag, the text is pasted outside the literal tag, but within a literal tag itself without the html class. The result i have is: <literal class="html"> </literal> <literal><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></literal> NOTE: using the not yet released service pack EZSP-011-EZP5.0 (see https://jira.ez.no/browse/QA-282 ) seems to solve the problem. So, some fix in there seems to solve the problem. I'll send this issue back to inpuQ in case development team want's to give a second look. If not, i suggest this issue status to pend the approval and release of EZSP-011-EZP5.0.- eZ Publish 5.1: EZSP-007-EZP5.1, distributed Feb 17th 2014 (today) seems to resolve the issue. At least in the form I described above. Without this service pack, the 5.1 has the same behaviour described above for ezp5.0- Edit : EZSP-007-EZP5.1 didn't solve the problem as I tough before. If we paste the referred code copying from a text editor, the literal tag disappear. If we paste the referred code copying from the browser, the HTML class is being stripped from the literal tag. eZ Publish 5.2: EZSP-004-EZP5.0, distributed Feb 17th 2014 (today) seems to resolve the issue. Without this service pack, the 5.2 has the same behaviour described above for ezp5.0 Edit : EZSP-004-EZP5.0 also didn't solve the problem as I tough before. As from ezp 5.1, if we paste the referred code copying from a text editor, the literal tag disappear. If we paste the referred code copying from the browser, the HTML class is being stripped from the literal tag.
          Hide
          Damien Pobel (Inactive) added a comment -

          The fix for EZP-21903 changes the behavior of the copy paste from a text editor to a literal

          Before the patch, I have the behavior reported by the customer. After the fix for EZP-21903, the copy/paste replaces the literal area. I'm trying to figure out what's going on

          Show
          Damien Pobel (Inactive) added a comment - The fix for EZP-21903 changes the behavior of the copy paste from a text editor to a literal Before the patch, I have the behavior reported by the customer. After the fix for EZP-21903 , the copy/paste replaces the literal area. I'm trying to figure out what's going on
          Hide
          Eduardo Fernandes (Inactive) added a comment -

          This bug happens in eZ Publish 4.7 as well.

          Show
          Eduardo Fernandes (Inactive) added a comment - This bug happens in eZ Publish 4.7 as well.
          Show
          Damien Pobel (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-legacy/pull/905
          Show
          Damien Pobel (Inactive) added a comment - Fixed in ezpublish-legacy: master: http://github.com/ezsystems/ezpublish-legacy/commit/43e6646fa1feb623cdda4e6a4db5d244e67cb705 stable-5.0: http://github.com/ezsystems/ezpublish-legacy-ee/commit/96f5b1397390c0fe0b5b7569a70dc1dca542066b stable-5.1: http://github.com/ezsystems/ezpublish-legacy-ee/commit/0874eaf03836e8e91ad8c886b734f73b6d1ea6e6 stable-5.2: http://github.com/ezsystems/ezpublish-legacy-ee/commit/c76fc7b678002ea96a2c639a8b34a12f07a307b3 Fixed in ezoe (eZ Publish 4.7): stable-5.5: http://github.com/ezsystems/ezoe/commit/37db6a9ba4d80f0507ec9b60f9109a6a0f54f3bb
          Hide
          Damien Pobel (Inactive) added a comment -

          @Marcos: actually, only the patches mentioned in my last comment are required

          Show
          Damien Pobel (Inactive) added a comment - @Marcos: actually, only the patches mentioned in my last comment are required
          Hide
          Marcos Loureiro (Inactive) added a comment -

          QA Approved

          Show
          Marcos Loureiro (Inactive) added a comment - QA Approved
          Hide
          Eduardo Fernandes (Inactive) added a comment -

          This patch will have negative impacts on Firefox.
          Please check EZP-22509

          Show
          Eduardo Fernandes (Inactive) added a comment - This patch will have negative impacts on Firefox. Please check EZP-22509

            People

            • Assignee:
              Unassigned
              Reporter:
              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