~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/oeb/polish/stats.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-05-14 18:17:50 UTC
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: package-import@ubuntu.com-20140514181750-efj1wymey2vb4cao
Tags: upstream-1.36.0+dfsg
ImportĀ upstreamĀ versionĀ 1.36.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
            src = rule.get('src', None)
254
254
            if not src:
255
255
                continue
 
256
            if src.startswith('url(') and src.endswith(')') and src[4] not in {'"', "'"}:
 
257
                # Quote the url otherwise cssutils fails to parse it if it has
 
258
                # ' or " in it
 
259
                src = "url('" + src[4:-1].replace("'", "\\'") + "')"
256
260
            style = self.parser.parseStyle('background-image:%s'%src, validate=False)
257
261
            src = style.getProperty('background-image').propertyValue[0].uri
258
262
            name = self.href_to_name(src, '@font-face rule')