ICEfaces
  1. ICEfaces
  2. ICE-9217

CSS URL Mapper Tool is not correctly handling data URLs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      n/a
    • Assignee Priority:
      P2

      Description

      The CSS URL Mapping tool does not correctly parse data urls, such as:

      background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzNkYmNlNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQlIiBzdG9wLWNvbG9yPSIjMzFiNmUxIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iOCUiIHN0b3AtY29sb3I9IiMyZGIyZGQiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxNiUiIHN0b3AtY29sb3I9IiMzNGI5ZTQiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIyNCUiIHN0b3AtY29sb3I9IiMyYmIyZGYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIzNiUiIHN0b3AtY29sb3I9IiMyN2IwZGMiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI1NiUiIHN0b3AtY29sb3I9IiMxY2E2ZDQiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI2NCUiIHN0b3AtY29sb3I9IiMxYmEzZDUiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI3NiUiIHN0b3AtY29sb3I9IiMxMzljY2EiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI4MCUiIHN0b3AtY29sb3I9IiMxNjk4YzkiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI4NCUiIHN0b3AtY29sb3I9IiMxNDk2YzgiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI4OCUiIHN0b3AtY29sb3I9IiMwZDk1YzciIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI5MiUiIHN0b3AtY29sb3I9IiMwYzkyYzUiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI5NiUiIHN0b3AtY29sb3I9IiMwYjhiYmMiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMTg4ZWJjIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
          

      And will process this in it's relative directory (ICEmobile skins in this case) as:

      background-image: url("#{resource['org.icefaces.component.skins']}");

        Activity

        Philip Breau created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Fix Version/s 3.4 [ 10770 ]
        Assignee Arturo Zambrano [ artzambrano ]
        Assignee Priority P2 [ 10011 ]
        Hide
        Arturo Zambrano added a comment -

        The CSS URL mapper was developed having in mind that only the standard URL format was to be used, since it was just a tool for internal use and only the standard format was used at that time. There were no third party libraries that did the parsing, so the parsing had to be done manually. Support for any other sort of formats will have to be explicitly added.

        Show
        Arturo Zambrano added a comment - The CSS URL mapper was developed having in mind that only the standard URL format was to be used, since it was just a tool for internal use and only the standard format was used at that time. There were no third party libraries that did the parsing, so the parsing had to be done manually. Support for any other sort of formats will have to be explicitly added.
        Arturo Zambrano made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34633 Wed May 01 12:22:39 MDT 2013 art.zambrano ICE-9217 added support for handling data URLs
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/tools/cssurlmapper/src/org/icefaces/ace/util/cssurlmapper/CssUrlMapper.java
        Hide
        Arturo Zambrano added a comment -

        Committed fix to the trunk at revision 34633.

        Tested fix with both encoded and non-encoded data URLs.

        Show
        Arturo Zambrano added a comment - Committed fix to the trunk at revision 34633. Tested fix with both encoded and non-encoded data URLs.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Arturo Zambrano added a comment -

        Replaced css url mapper jar in the icemobile project with this fix at revision 34670.

        Show
        Arturo Zambrano added a comment - Replaced css url mapper jar in the icemobile project with this fix at revision 34670.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34670 Thu May 02 10:55:53 MDT 2013 art.zambrano ICE-9217 replaced css url mapper jar, now with support for data urls
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/lib/generator/cssurlmapper.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34671 Thu May 02 11:21:29 MDT 2013 art.zambrano ICE-9217 re-compiled new cssurlmapper.jar with JRE 1.5 compatible class level
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/lib/generator/cssurlmapper.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34673 Thu May 02 11:56:59 MDT 2013 art.zambrano ICE-9217 changed compilation targets of ACE build scripts to 1.5, so that it all works with icemobile, etc.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/tools/ckeditorurlmapper/build.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/tools/cssurlmapper/build.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/build.xml
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA [ 10572 ]
        Ken Fyten made changes -
        Issue Type Improvement [ 4 ] Bug [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: