~ubuntu-branches/ubuntu/oneiric/lxml/oneiric

« back to all changes in this revision

Viewing changes to src/lxml/html/tests/test_rewritelinks.txt

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-08-27 09:09:23 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090827090923-fwhvka191ir73s3x
Tags: 2.2.2-1
* New upstream version. Closes: #525961.
  - Includes html5parser. Closes: #521714.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
      body {background-image: url(https://new/image.gif)};
46
46
      @import "https://new/other-style.css";
47
47
    </style></head></html>
 
48
    >>> print(rewrite_links('''
 
49
    ... <style>
 
50
    ...   body {background-image: url("http://old/image.gif")};
 
51
    ...   @import "http://old/other-style.css";
 
52
    ... </style>''', relocate_href))
 
53
    <html><head><style>
 
54
      body {background-image: url("https://new/image.gif")};
 
55
      @import "https://new/other-style.css";
 
56
    </style></head></html>
48
57
 
49
58
Those links in style attributes are also rewritten::
50
59