Uploaded image for project: '[Read Only] - HtmlDiff'
  1. [Read Only] - HtmlDiff
  2. HTMLDIFF-6

NPE in ImageNode class when images do not have a src attribute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Top
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.01.04
    • Similar issues:
    • Flagged:
      Flagged
    • Processed by team:
      Pulsar
    • Sprint:
      Platform sprint 129

      Description

      When the html code of a rich text field contains an <img> tag that does not have an src attribute, the CMS hangs and the editor cannot continue to work. This is due to a NPE that occurs in a class that is used to create the html diff of the rich text field for the compare mode.

      The NPE occurs in org.outerj.daisy.diff.html.dom.ImageNode#ImageNode, where attrs.getValue("src") in this case is null.

      Example of img tag without src attribute:

      <picture> <source media="(max-width: 767px)" srcset="/binaries/content/gallery/myhippoproject/samples/viognier-grapes-188185_640.jpg" /> <span id="cke_bm_276S" style="display: none;"> </span><img alt="Some alt text" class="banner-image" srcset="/binaries/content/gallery/myhippoproject/samples/viognier-grapes-188185_640.jpg" /><span id="cke_bm_276E" style="display: none;"> </span> </picture>

        Attachments

          Activity

            People

            • Assignee:
              pulsarteam Pulsar Team
              Reporter:
              bleunis Bert Leunis (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: