middleman-sprockets 3.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/.gitignore +5 -0
  2. data/.travis.yml +10 -0
  3. data/Gemfile +28 -0
  4. data/LICENSE +20 -0
  5. data/README.md +49 -0
  6. data/Rakefile +19 -0
  7. data/features/asset_hash.feature +102 -0
  8. data/features/sass_partials.feature +34 -0
  9. data/features/sprockets.feature +52 -0
  10. data/features/sprockets_gems.feature +15 -0
  11. data/features/support/env.rb +4 -0
  12. data/fixtures/asset-hash-app/config.rb +7 -0
  13. data/fixtures/asset-hash-app/source/images/100px.gif +0 -0
  14. data/fixtures/asset-hash-app/source/images/100px.jpg +0 -0
  15. data/fixtures/asset-hash-app/source/images/100px.png +0 -0
  16. data/fixtures/asset-hash-app/source/index.html.erb +308 -0
  17. data/fixtures/asset-hash-app/source/javascripts/application.js +8 -0
  18. data/fixtures/asset-hash-app/source/javascripts/sprockets_base.js +5 -0
  19. data/fixtures/asset-hash-app/source/javascripts/sprockets_sub.js +3 -0
  20. data/fixtures/asset-hash-app/source/layout.erb +18 -0
  21. data/fixtures/asset-hash-app/source/other.html.erb +2 -0
  22. data/fixtures/asset-hash-app/source/partials.html.erb +2 -0
  23. data/fixtures/asset-hash-app/source/stylesheets/_partial.sass +2 -0
  24. data/fixtures/asset-hash-app/source/stylesheets/site.css.scss +4 -0
  25. data/fixtures/asset-hash-app/source/stylesheets/uses_partials.css.sass +4 -0
  26. data/fixtures/asset-hash-app/source/subdir/index.html.erb +308 -0
  27. data/fixtures/asset-hash-host-app/config.rb +6 -0
  28. data/fixtures/asset-hash-host-app/source/images/100px.gif +0 -0
  29. data/fixtures/asset-hash-host-app/source/images/100px.jpg +0 -0
  30. data/fixtures/asset-hash-host-app/source/images/100px.png +0 -0
  31. data/fixtures/asset-hash-host-app/source/index.html.erb +6 -0
  32. data/fixtures/asset-hash-host-app/source/layout.erb +17 -0
  33. data/fixtures/asset-hash-host-app/source/other.html.erb +2 -0
  34. data/fixtures/asset-hash-host-app/source/stylesheets/site.css.scss +4 -0
  35. data/fixtures/asset-hash-host-app/source/subdir/index.html.erb +6 -0
  36. data/fixtures/preview-app/config.rb +0 -0
  37. data/fixtures/preview-app/source/content.html.erb +1 -0
  38. data/fixtures/preview-app/source/layout.erb +1 -0
  39. data/fixtures/preview-app/source/stylesheets/_partial.sass +2 -0
  40. data/fixtures/preview-app/source/stylesheets/_partial2.css.sass +2 -0
  41. data/fixtures/preview-app/source/stylesheets/main.css.sass +4 -0
  42. data/fixtures/preview-app/source/stylesheets/main2.css.sass +4 -0
  43. data/fixtures/preview-app/source/stylesheets/plain.css.sass +2 -0
  44. data/fixtures/sprockets-app/config.rb +2 -0
  45. data/fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss +1 -0
  46. data/fixtures/sprockets-app/source/library/css/plain.css +3 -0
  47. data/fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss +1 -0
  48. data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +1 -0
  49. data/fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss +1 -0
  50. data/fixtures/sprockets-app/source/library/js/jquery_include.js +1 -0
  51. data/fixtures/sprockets-app/source/library/js/plain.js +3 -0
  52. data/fixtures/sprockets-app/source/library/js/sprockets_base.js +5 -0
  53. data/fixtures/sprockets-app/source/library/js/sprockets_sub.js +3 -0
  54. data/fixtures/sprockets-app/source/library/js/vendored_include.js +1 -0
  55. data/fixtures/sprockets-app/vendor/assets/javascripts/vendored_js.js +1 -0
  56. data/fixtures/sprockets-app2/config.rb +0 -0
  57. data/fixtures/sprockets-app2/data/test.yml +4 -0
  58. data/fixtures/sprockets-app2/data/test2.json +4 -0
  59. data/fixtures/sprockets-app2/source/javascripts/multiple_engines.js.coffee.erb +1 -0
  60. data/fixtures/sprockets-app2/source/javascripts/sprockets_base.js +5 -0
  61. data/fixtures/sprockets-app2/source/javascripts/sprockets_sub.js +3 -0
  62. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base1.css.scss +1 -0
  63. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base2.css.scss +1 -0
  64. data/fixtures/sprockets-app2/source/stylesheets/sprockets_sub.css.scss +1 -0
  65. data/lib/middleman-sprockets.rb +7 -0
  66. data/lib/middleman-sprockets/extension.rb +112 -0
  67. data/lib/middleman-sprockets/sass.rb +77 -0
  68. data/lib/middleman-sprockets/version.rb +5 -0
  69. data/lib/middleman_extension.rb +1 -0
  70. data/middleman-sprockets.gemspec +24 -0
  71. metadata +216 -0
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ .DS_Store
2
+ Gemfile.lock
3
+ tmp
4
+ .rbenv-*
5
+ .sass-cache
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - jruby-18mode
6
+ - jruby-19mode
7
+
8
+ script: "bundle exec rake test"
9
+
10
+ env: TEST=true
data/Gemfile ADDED
@@ -0,0 +1,28 @@
1
+ source :rubygems
2
+
3
+ git "git://github.com/middleman/middleman.git" do
4
+ gem "middleman"
5
+ gem "middleman-core"
6
+ gem "middleman-more"
7
+ end
8
+
9
+ # Specify your gem's dependencies in middleman-blog.gemspec
10
+ gemspec
11
+
12
+ group :development do
13
+ gem "rake", "~> 0.9.2"
14
+ gem "rdoc", "~> 3.9"
15
+ gem "yard", "~> 0.8.0"
16
+ end
17
+
18
+ group :test do
19
+ gem "cucumber", "~> 1.2.0"
20
+ gem "fivemat"
21
+ gem "aruba", "~> 0.4.11"
22
+ gem "rspec", "~> 2.7"
23
+
24
+ # For actual tests
25
+ gem "jquery-rails", "~> 2.0.1"
26
+ # gem "bootstrap-rails", "0.0.5"
27
+ # gem "zurb-foundation"
28
+ end
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Thomas Reynolds
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # middleman-sprockets
2
+
3
+ # Install
4
+
5
+ ```
6
+ gem install middleman-sprockets
7
+ ```
8
+
9
+ If you already have a Middleman project:
10
+ Add `middleman-sprockets` to your `Gemfile`, and open your `config.rb` and add:
11
+
12
+ ```
13
+ activate :sprockets
14
+ ```
15
+
16
+ # Community
17
+
18
+ The official community forum is available at:
19
+
20
+ http://forum.middlemanapp.com/
21
+
22
+ # Bug Reports
23
+
24
+ GitHub Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems:
25
+
26
+ https://github.com/middleman/middleman-sprockets/issues
27
+
28
+ The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit Pull Requests containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.
29
+
30
+ # Build & Dependency Status
31
+
32
+ [![Build Status](http://travis-ci.org/middleman/middleman-sprockets.png)](http://travis-ci.org/middleman/middleman-sprockets)
33
+
34
+ # How to Run Cucumber Tests
35
+
36
+ 1. Checkout Repository: `git clone https://github.com/middleman/middleman-sprockets.git`
37
+ 2. Install Bundler: `gem install bundler`
38
+ 3. Run `bundle install` inside the project root to install the gem dependencies.
39
+ 4. Run test cases: `bundle exec rake test`
40
+
41
+ # Donate
42
+
43
+ [![Click here to lend your support to Middleman](https://www.pledgie.com/campaigns/15807.png)](http://www.pledgie.com/campaigns/15807)
44
+
45
+ # License
46
+
47
+ Copyright (c) 2012 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.
48
+
49
+ [LICENSE]: https://github.com/middleman/middleman-blog/blob/master/LICENSE
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'cucumber/rake/task'
5
+
6
+ Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
7
+ ENV["TEST"] = "true"
8
+ ENV["AUTOLOAD_SPROCKETS"] = "true"
9
+ t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
10
+ end
11
+
12
+ require 'rake/clean'
13
+
14
+ task :test => ["cucumber"]
15
+
16
+ desc "Build HTML documentation"
17
+ task :doc do
18
+ sh 'bundle exec yard'
19
+ end
@@ -0,0 +1,102 @@
1
+ Feature: Assets get a file hash appended to their and references to them are updated
2
+ Scenario: Hashed-asset files are produced, and HTML, CSS, and JavaScript gets rewritten to reference the new files
3
+ Given a successfully built app at "asset-hash-app"
4
+ When I cd to "build"
5
+ Then the following files should exist:
6
+ | index.html |
7
+ | images/100px-1242c368.png |
8
+ | images/100px-5fd6fb90.jpg |
9
+ | images/100px-5fd6fb90.gif |
10
+ | javascripts/application-df677242.js |
11
+ | stylesheets/site-ed8c2d12.css |
12
+ | index.html |
13
+ | subdir/index.html |
14
+ | other/index.html |
15
+ And the following files should not exist:
16
+ | images/100px.png |
17
+ | images/100px.jpg |
18
+ | images/100px.gif |
19
+ | javascripts/application.js |
20
+ | stylesheets/site.css |
21
+
22
+ And the file "javascripts/application-df677242.js" should contain "img.src = '/images/100px-5fd6fb90.jpg'"
23
+ And the file "stylesheets/site-ed8c2d12.css" should contain "background-image: url('../images/100px-5fd6fb90.jpg')"
24
+ And the file "index.html" should contain 'href="stylesheets/site-ed8c2d12.css"'
25
+ And the file "index.html" should contain 'src="javascripts/application-df677242.js"'
26
+ And the file "index.html" should contain 'src="images/100px-5fd6fb90.jpg"'
27
+ And the file "subdir/index.html" should contain 'href="../stylesheets/site-ed8c2d12.css"'
28
+ And the file "subdir/index.html" should contain 'src="../javascripts/application-df677242.js"'
29
+ And the file "subdir/index.html" should contain 'src="../images/100px-5fd6fb90.jpg"'
30
+ And the file "other/index.html" should contain 'href="../stylesheets/site-ed8c2d12.css"'
31
+ And the file "other/index.html" should contain 'src="../javascripts/application-df677242.js"'
32
+ And the file "other/index.html" should contain 'src="../images/100px-5fd6fb90.jpg"'
33
+
34
+ Scenario: Hashed assets work in preview server
35
+ Given the Server is running at "asset-hash-app"
36
+ When I go to "/"
37
+ Then I should see 'href="stylesheets/site-ed8c2d12.css"'
38
+ And I should see 'src="javascripts/application-df677242.js"'
39
+ And I should see 'src="images/100px-5fd6fb90.jpg"'
40
+ When I go to "/subdir/"
41
+ Then I should see 'href="../stylesheets/site-ed8c2d12.css"'
42
+ And I should see 'src="../javascripts/application-df677242.js"'
43
+ And I should see 'src="../images/100px-5fd6fb90.jpg"'
44
+ When I go to "/other/"
45
+ Then I should see 'href="../stylesheets/site-ed8c2d12.css"'
46
+ And I should see 'src="../javascripts/application-df677242.js"'
47
+ And I should see 'src="../images/100px-5fd6fb90.jpg"'
48
+ When I go to "/javascripts/application-df677242.js"
49
+ Then I should see "img.src = '/images/100px-5fd6fb90.jpg'"
50
+ When I go to "/stylesheets/site-ed8c2d12.css"
51
+ Then I should see "background-image: url('../images/100px-5fd6fb90.jpg')"
52
+
53
+ Scenario: Enabling an asset host still produces hashed files and references
54
+ Given the Server is running at "asset-hash-host-app"
55
+ When I go to "/"
56
+ Then I should see 'href="http://middlemanapp.com/stylesheets/site-e5a31a3e.css"'
57
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
58
+ When I go to "/subdir/"
59
+ Then I should see 'href="http://middlemanapp.com/stylesheets/site-e5a31a3e.css"'
60
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
61
+ When I go to "/other/"
62
+ Then I should see 'href="http://middlemanapp.com/stylesheets/site-e5a31a3e.css"'
63
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
64
+ # Asset helpers don't appear to work from Compass right now
65
+ # When I go to "/stylesheets/site-e5a31a3e.css"
66
+ # Then I should see "background-image: url('http://middlemanapp.com/images/100px-5fd6fb90.jpg')"
67
+
68
+ Scenario: The asset hash should change when a SASS partial changes
69
+ Given the Server is running at "asset-hash-app"
70
+ And the file "source/stylesheets/_partial.sass" has the contents
71
+ """
72
+ body
73
+ font-size: 14px
74
+ """
75
+ When I go to "/partials/"
76
+ Then I should see 'href="../stylesheets/uses_partials-8b948098.css'
77
+ And the file "source/stylesheets/_partial.sass" has the contents
78
+ """
79
+ body
80
+ font-size: 18px !important
81
+ """
82
+ When I go to "/partials/"
83
+ Then I should see 'href="../stylesheets/uses_partials-1f9f0ed2.css'
84
+
85
+ Scenario: The asset hash should change when a Javascript partial changes
86
+ Given the Server is running at "asset-hash-app"
87
+ And the file "source/javascripts/sprockets_sub.js" has the contents
88
+ """
89
+ function sprockets_sub_function() { }
90
+ """
91
+ When I go to "/partials/"
92
+ Then I should see 'src="../javascripts/sprockets_base-0252a861.js'
93
+ When I go to "/javascripts/sprockets_base-0252a861.js"
94
+ Then I should see "sprockets_sub_function"
95
+ And the file "source/javascripts/sprockets_sub.js" has the contents
96
+ """
97
+ function sprockets_sub2_function() { }
98
+ """
99
+ When I go to "/partials/"
100
+ Then I should see 'src="../javascripts/sprockets_base-5121d891.js'
101
+ When I go to "/javascripts/sprockets_base-5121d891.js"
102
+ Then I should see "sprockets_sub2_function"
@@ -0,0 +1,34 @@
1
+ Feature: Sass partials should work with Sprockets
2
+
3
+ Scenario: The preview server should update stylesheets when Sprockets partials change
4
+ Given the Server is running at "preview-app"
5
+ And the file "source/stylesheets/main2.css.sass" has the contents
6
+ """
7
+ //= require "_partial2.css.sass"
8
+
9
+ red
10
+ color: red
11
+ """
12
+ And the file "source/stylesheets/_partial2.css.sass" has the contents
13
+ """
14
+ body
15
+ font-size: 14px
16
+ """
17
+ When I go to "/stylesheets/main2.css"
18
+ Then I should see "color: red;"
19
+ Then I should see "font-size: 14px"
20
+ And the file "source/stylesheets/main2.css.sass" has the contents
21
+ """
22
+ //= require "_partial2.css.sass"
23
+
24
+ red
25
+ color: blue
26
+ """
27
+ And the file "source/stylesheets/_partial2.css.sass" has the contents
28
+ """
29
+ body
30
+ font-size: 18px
31
+ """
32
+ When I go to "/stylesheets/main2.css"
33
+ Then I should see "color: blue;"
34
+ Then I should see "font-size: 18px"
@@ -0,0 +1,52 @@
1
+ Feature: Sprockets
2
+
3
+ Scenario: Sprockets JS require
4
+ Given the Server is running at "sprockets-app2"
5
+ When I go to "/javascripts/sprockets_base.js"
6
+ Then I should see "sprockets_sub_function"
7
+
8
+ Scenario: Sprockets JS require with custom :js_dir
9
+ Given the Server is running at "sprockets-app"
10
+ When I go to "/library/js/sprockets_base.js"
11
+ Then I should see "sprockets_sub_function"
12
+
13
+ Scenario: Plain JS require with custom :js_dir
14
+ Given the Server is running at "sprockets-app"
15
+ When I go to "/library/css/plain.css"
16
+ Then I should see "helloWorld"
17
+
18
+ Scenario: Sprockets JS should have access to yaml data
19
+ Given the Server is running at "sprockets-app2"
20
+ When I go to "/javascripts/multiple_engines.js"
21
+ Then I should see "Hello One"
22
+
23
+ Scenario: Multiple engine files should build correctly
24
+ Given a successfully built app at "sprockets-app2"
25
+ When I cd to "build"
26
+ Then a file named "javascripts/multiple_engines.js" should exist
27
+ And the file "javascripts/multiple_engines.js" should contain "Hello One"
28
+
29
+ Scenario: Sprockets CSS require //require
30
+ Given the Server is running at "sprockets-app2"
31
+ When I go to "/stylesheets/sprockets_base1.css"
32
+ Then I should see "hello"
33
+
34
+ Scenario: Sprockets CSS require @import
35
+ Given the Server is running at "sprockets-app2"
36
+ When I go to "/stylesheets/sprockets_base2.css"
37
+ Then I should see "hello"
38
+
39
+ Scenario: Sprockets CSS require with custom :css_dir //require
40
+ Given the Server is running at "sprockets-app"
41
+ When I go to "/library/css/sprockets_base1.css"
42
+ Then I should see "hello"
43
+
44
+ Scenario: Plain CSS require with custom :css_dir
45
+ Given the Server is running at "sprockets-app"
46
+ When I go to "/library/css/plain.css"
47
+ Then I should see "helloWorld"
48
+
49
+ Scenario: Sprockets CSS require with custom :css_dir @import
50
+ Given the Server is running at "sprockets-app"
51
+ When I go to "/library/css/sprockets_base2.css"
52
+ Then I should see "hello"
@@ -0,0 +1,15 @@
1
+ Feature: Sprockets Gems
2
+ Scenario: Sprockets can pull jQuery from gem
3
+ Given the Server is running at "sprockets-app"
4
+ When I go to "/library/js/jquery_include.js"
5
+ Then I should see "var jQuery ="
6
+
7
+ # Scenario: Sprockets can pull CSS from gem
8
+ # Given the Server is running at "sprockets-app"
9
+ # When I go to "/library/css/bootstrap_include.css"
10
+ # Then I should see "Bootstrap"
11
+
12
+ Scenario: Sprockets can pull js from vendored assets
13
+ Given the Server is running at "sprockets-app"
14
+ When I go to "/library/js/vendored_include.js"
15
+ Then I should see "var vendored_js_included = true;"
@@ -0,0 +1,4 @@
1
+ PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
2
+ require "middleman-core"
3
+ require "middleman-core/step_definitions"
4
+ require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-sprockets')
@@ -0,0 +1,7 @@
1
+ activate :asset_hash
2
+
3
+ activate :relative_assets
4
+
5
+ activate :directory_indexes
6
+
7
+ #page '/foo.html', :directory_index => false
@@ -0,0 +1,308 @@
1
+ <% content_for :head do %>
2
+ <title>The Middleman!</title>
3
+ <% end %>
4
+
5
+ <h2>Image url:</h2>
6
+ <img src="<%= image_path('100px.jpg') %>">
7
+
8
+ <h2>Autogenerated tests:</h2>
9
+ <p>images/100px.jpg</p>
10
+ <p>/images/100px.jpg</p>
11
+ <p>../images/100px.jpg</p>
12
+ <p>../../images/100px.jpg</p>
13
+ <p>../../../images/100px.jpg</p>
14
+ <p>http://example.com/images/100px.jpg</p>
15
+ <p>aimages/100px.jpga</p>
16
+ <p>1images/100px.jpg1</p>
17
+ <p>.images/100px.jpg.</p>
18
+ <p>-images/100px.jpg-</p>
19
+ <p>_images/100px.jpg_</p>
20
+ <p>'images/100px.jpg'</p>
21
+ <p>'/images/100px.jpg'</p>
22
+ <p>'../images/100px.jpg'</p>
23
+ <p>'../../images/100px.jpg'</p>
24
+ <p>'../../../images/100px.jpg'</p>
25
+ <p>'http://example.com/images/100px.jpg'</p>
26
+ <p>'aimages/100px.jpga'</p>
27
+ <p>'1images/100px.jpg1'</p>
28
+ <p>'.images/100px.jpg.'</p>
29
+ <p>'-images/100px.jpg-'</p>
30
+ <p>'_images/100px.jpg_'</p>
31
+ <p>"images/100px.jpg"</p>
32
+ <p>"/images/100px.jpg"</p>
33
+ <p>"../images/100px.jpg"</p>
34
+ <p>"../../images/100px.jpg"</p>
35
+ <p>"../../../images/100px.jpg"</p>
36
+ <p>"http://example.com/images/100px.jpg"</p>
37
+ <p>"aimages/100px.jpga"</p>
38
+ <p>"1images/100px.jpg1"</p>
39
+ <p>".images/100px.jpg."</p>
40
+ <p>"-images/100px.jpg-"</p>
41
+ <p>"_images/100px.jpg_"</p>
42
+ <p>&lt;img src=images/100px.jpg /&gt;</p>
43
+ <p>&lt;img src=/images/100px.jpg /&gt;</p>
44
+ <p>&lt;img src=../images/100px.jpg /&gt;</p>
45
+ <p>&lt;img src=../../images/100px.jpg /&gt;</p>
46
+ <p>&lt;img src=../../../images/100px.jpg /&gt;</p>
47
+ <p>&lt;img src=http://example.com/images/100px.jpg /&gt;</p>
48
+ <p>&lt;img src=aimages/100px.jpga /&gt;</p>
49
+ <p>&lt;img src=1images/100px.jpg1 /&gt;</p>
50
+ <p>&lt;img src=.images/100px.jpg. /&gt;</p>
51
+ <p>&lt;img src=-images/100px.jpg- /&gt;</p>
52
+ <p>&lt;img src=_images/100px.jpg_ /&gt;</p>
53
+ <p>&lt;img src='images/100px.jpg' /&gt;</p>
54
+ <p>&lt;img src='/images/100px.jpg' /&gt;</p>
55
+ <p>&lt;img src='../images/100px.jpg' /&gt;</p>
56
+ <p>&lt;img src='../../images/100px.jpg' /&gt;</p>
57
+ <p>&lt;img src='../../../images/100px.jpg' /&gt;</p>
58
+ <p>&lt;img src='http://example.com/images/100px.jpg' /&gt;</p>
59
+ <p>&lt;img src='aimages/100px.jpga' /&gt;</p>
60
+ <p>&lt;img src='1images/100px.jpg1' /&gt;</p>
61
+ <p>&lt;img src='.images/100px.jpg.' /&gt;</p>
62
+ <p>&lt;img src='-images/100px.jpg-' /&gt;</p>
63
+ <p>&lt;img src='_images/100px.jpg_' /&gt;</p>
64
+ <p>&lt;img src="images/100px.jpg" /&gt;</p>
65
+ <p>&lt;img src="/images/100px.jpg" /&gt;</p>
66
+ <p>&lt;img src="../images/100px.jpg" /&gt;</p>
67
+ <p>&lt;img src="../../images/100px.jpg" /&gt;</p>
68
+ <p>&lt;img src="../../../images/100px.jpg" /&gt;</p>
69
+ <p>&lt;img src="http://example.com/images/100px.jpg" /&gt;</p>
70
+ <p>&lt;img src="aimages/100px.jpga" /&gt;</p>
71
+ <p>&lt;img src="1images/100px.jpg1" /&gt;</p>
72
+ <p>&lt;img src=".images/100px.jpg." /&gt;</p>
73
+ <p>&lt;img src="-images/100px.jpg-" /&gt;</p>
74
+ <p>&lt;img src="_images/100px.jpg_" /&gt;</p>
75
+ <p>background-image:url(images/100px.jpg);</p>
76
+ <p>background-image:url(/images/100px.jpg);</p>
77
+ <p>background-image:url(../images/100px.jpg);</p>
78
+ <p>background-image:url(../../images/100px.jpg);</p>
79
+ <p>background-image:url(../../../images/100px.jpg);</p>
80
+ <p>background-image:url(http://example.com/images/100px.jpg);</p>
81
+ <p>background-image:url(aimages/100px.jpga);</p>
82
+ <p>background-image:url(1images/100px.jpg1);</p>
83
+ <p>background-image:url(.images/100px.jpg.);</p>
84
+ <p>background-image:url(-images/100px.jpg-);</p>
85
+ <p>background-image:url(_images/100px.jpg_);</p>
86
+ <p>background-image:url('images/100px.jpg');</p>
87
+ <p>background-image:url('/images/100px.jpg');</p>
88
+ <p>background-image:url('../images/100px.jpg');</p>
89
+ <p>background-image:url('../../images/100px.jpg');</p>
90
+ <p>background-image:url('../../../images/100px.jpg');</p>
91
+ <p>background-image:url('http://example.com/images/100px.jpg');</p>
92
+ <p>background-image:url('aimages/100px.jpga');</p>
93
+ <p>background-image:url('1images/100px.jpg1');</p>
94
+ <p>background-image:url('.images/100px.jpg.');</p>
95
+ <p>background-image:url('-images/100px.jpg-');</p>
96
+ <p>background-image:url('_images/100px.jpg_');</p>
97
+ <p>background-image:url("images/100px.jpg");</p>
98
+ <p>background-image:url("/images/100px.jpg");</p>
99
+ <p>background-image:url("../images/100px.jpg");</p>
100
+ <p>background-image:url("../../images/100px.jpg");</p>
101
+ <p>background-image:url("../../../images/100px.jpg");</p>
102
+ <p>background-image:url("http://example.com/images/100px.jpg");</p>
103
+ <p>background-image:url("aimages/100px.jpga");</p>
104
+ <p>background-image:url("1images/100px.jpg1");</p>
105
+ <p>background-image:url(".images/100px.jpg.");</p>
106
+ <p>background-image:url("-images/100px.jpg-");</p>
107
+ <p>background-image:url("_images/100px.jpg_");</p>
108
+ <br /><br /><br />
109
+ <p>images/100px.png</p>
110
+ <p>/images/100px.png</p>
111
+ <p>../images/100px.png</p>
112
+ <p>../../images/100px.png</p>
113
+ <p>../../../images/100px.png</p>
114
+ <p>http://example.com/images/100px.png</p>
115
+ <p>aimages/100px.pnga</p>
116
+ <p>1images/100px.png1</p>
117
+ <p>.images/100px.png.</p>
118
+ <p>-images/100px.png-</p>
119
+ <p>_images/100px.png_</p>
120
+ <p>'images/100px.png'</p>
121
+ <p>'/images/100px.png'</p>
122
+ <p>'../images/100px.png'</p>
123
+ <p>'../../images/100px.png'</p>
124
+ <p>'../../../images/100px.png'</p>
125
+ <p>'http://example.com/images/100px.png'</p>
126
+ <p>'aimages/100px.pnga'</p>
127
+ <p>'1images/100px.png1'</p>
128
+ <p>'.images/100px.png.'</p>
129
+ <p>'-images/100px.png-'</p>
130
+ <p>'_images/100px.png_'</p>
131
+ <p>"images/100px.png"</p>
132
+ <p>"/images/100px.png"</p>
133
+ <p>"../images/100px.png"</p>
134
+ <p>"../../images/100px.png"</p>
135
+ <p>"../../../images/100px.png"</p>
136
+ <p>"http://example.com/images/100px.png"</p>
137
+ <p>"aimages/100px.pnga"</p>
138
+ <p>"1images/100px.png1"</p>
139
+ <p>".images/100px.png."</p>
140
+ <p>"-images/100px.png-"</p>
141
+ <p>"_images/100px.png_"</p>
142
+ <p>&lt;img src=images/100px.png /&gt;</p>
143
+ <p>&lt;img src=/images/100px.png /&gt;</p>
144
+ <p>&lt;img src=../images/100px.png /&gt;</p>
145
+ <p>&lt;img src=../../images/100px.png /&gt;</p>
146
+ <p>&lt;img src=../../../images/100px.png /&gt;</p>
147
+ <p>&lt;img src=http://example.com/images/100px.png /&gt;</p>
148
+ <p>&lt;img src=aimages/100px.pnga /&gt;</p>
149
+ <p>&lt;img src=1images/100px.png1 /&gt;</p>
150
+ <p>&lt;img src=.images/100px.png. /&gt;</p>
151
+ <p>&lt;img src=-images/100px.png- /&gt;</p>
152
+ <p>&lt;img src=_images/100px.png_ /&gt;</p>
153
+ <p>&lt;img src='images/100px.png' /&gt;</p>
154
+ <p>&lt;img src='/images/100px.png' /&gt;</p>
155
+ <p>&lt;img src='../images/100px.png' /&gt;</p>
156
+ <p>&lt;img src='../../images/100px.png' /&gt;</p>
157
+ <p>&lt;img src='../../../images/100px.png' /&gt;</p>
158
+ <p>&lt;img src='http://example.com/images/100px.png' /&gt;</p>
159
+ <p>&lt;img src='aimages/100px.pnga' /&gt;</p>
160
+ <p>&lt;img src='1images/100px.png1' /&gt;</p>
161
+ <p>&lt;img src='.images/100px.png.' /&gt;</p>
162
+ <p>&lt;img src='-images/100px.png-' /&gt;</p>
163
+ <p>&lt;img src='_images/100px.png_' /&gt;</p>
164
+ <p>&lt;img src="images/100px.png" /&gt;</p>
165
+ <p>&lt;img src="/images/100px.png" /&gt;</p>
166
+ <p>&lt;img src="../images/100px.png" /&gt;</p>
167
+ <p>&lt;img src="../../images/100px.png" /&gt;</p>
168
+ <p>&lt;img src="../../../images/100px.png" /&gt;</p>
169
+ <p>&lt;img src="http://example.com/images/100px.png" /&gt;</p>
170
+ <p>&lt;img src="aimages/100px.pnga" /&gt;</p>
171
+ <p>&lt;img src="1images/100px.png1" /&gt;</p>
172
+ <p>&lt;img src=".images/100px.png." /&gt;</p>
173
+ <p>&lt;img src="-images/100px.png-" /&gt;</p>
174
+ <p>&lt;img src="_images/100px.png_" /&gt;</p>
175
+ <p>background-image:url(images/100px.png);</p>
176
+ <p>background-image:url(/images/100px.png);</p>
177
+ <p>background-image:url(../images/100px.png);</p>
178
+ <p>background-image:url(../../images/100px.png);</p>
179
+ <p>background-image:url(../../../images/100px.png);</p>
180
+ <p>background-image:url(http://example.com/images/100px.png);</p>
181
+ <p>background-image:url(aimages/100px.pnga);</p>
182
+ <p>background-image:url(1images/100px.png1);</p>
183
+ <p>background-image:url(.images/100px.png.);</p>
184
+ <p>background-image:url(-images/100px.png-);</p>
185
+ <p>background-image:url(_images/100px.png_);</p>
186
+ <p>background-image:url('images/100px.png');</p>
187
+ <p>background-image:url('/images/100px.png');</p>
188
+ <p>background-image:url('../images/100px.png');</p>
189
+ <p>background-image:url('../../images/100px.png');</p>
190
+ <p>background-image:url('../../../images/100px.png');</p>
191
+ <p>background-image:url('http://example.com/images/100px.png');</p>
192
+ <p>background-image:url('aimages/100px.pnga');</p>
193
+ <p>background-image:url('1images/100px.png1');</p>
194
+ <p>background-image:url('.images/100px.png.');</p>
195
+ <p>background-image:url('-images/100px.png-');</p>
196
+ <p>background-image:url('_images/100px.png_');</p>
197
+ <p>background-image:url("images/100px.png");</p>
198
+ <p>background-image:url("/images/100px.png");</p>
199
+ <p>background-image:url("../images/100px.png");</p>
200
+ <p>background-image:url("../../images/100px.png");</p>
201
+ <p>background-image:url("../../../images/100px.png");</p>
202
+ <p>background-image:url("http://example.com/images/100px.png");</p>
203
+ <p>background-image:url("aimages/100px.pnga");</p>
204
+ <p>background-image:url("1images/100px.png1");</p>
205
+ <p>background-image:url(".images/100px.png.");</p>
206
+ <p>background-image:url("-images/100px.png-");</p>
207
+ <p>background-image:url("_images/100px.png_");</p>
208
+ <br /><br /><br />
209
+ <p>images/100px.gif</p>
210
+ <p>/images/100px.gif</p>
211
+ <p>../images/100px.gif</p>
212
+ <p>../../images/100px.gif</p>
213
+ <p>../../../images/100px.gif</p>
214
+ <p>http://example.com/images/100px.gif</p>
215
+ <p>aimages/100px.gifa</p>
216
+ <p>1images/100px.gif1</p>
217
+ <p>.images/100px.gif.</p>
218
+ <p>-images/100px.gif-</p>
219
+ <p>_images/100px.gif_</p>
220
+ <p>'images/100px.gif'</p>
221
+ <p>'/images/100px.gif'</p>
222
+ <p>'../images/100px.gif'</p>
223
+ <p>'../../images/100px.gif'</p>
224
+ <p>'../../../images/100px.gif'</p>
225
+ <p>'http://example.com/images/100px.gif'</p>
226
+ <p>'aimages/100px.gifa'</p>
227
+ <p>'1images/100px.gif1'</p>
228
+ <p>'.images/100px.gif.'</p>
229
+ <p>'-images/100px.gif-'</p>
230
+ <p>'_images/100px.gif_'</p>
231
+ <p>"images/100px.gif"</p>
232
+ <p>"/images/100px.gif"</p>
233
+ <p>"../images/100px.gif"</p>
234
+ <p>"../../images/100px.gif"</p>
235
+ <p>"../../../images/100px.gif"</p>
236
+ <p>"http://example.com/images/100px.gif"</p>
237
+ <p>"aimages/100px.gifa"</p>
238
+ <p>"1images/100px.gif1"</p>
239
+ <p>".images/100px.gif."</p>
240
+ <p>"-images/100px.gif-"</p>
241
+ <p>"_images/100px.gif_"</p>
242
+ <p>&lt;img src=images/100px.gif /&gt;</p>
243
+ <p>&lt;img src=/images/100px.gif /&gt;</p>
244
+ <p>&lt;img src=../images/100px.gif /&gt;</p>
245
+ <p>&lt;img src=../../images/100px.gif /&gt;</p>
246
+ <p>&lt;img src=../../../images/100px.gif /&gt;</p>
247
+ <p>&lt;img src=http://example.com/images/100px.gif /&gt;</p>
248
+ <p>&lt;img src=aimages/100px.gifa /&gt;</p>
249
+ <p>&lt;img src=1images/100px.gif1 /&gt;</p>
250
+ <p>&lt;img src=.images/100px.gif. /&gt;</p>
251
+ <p>&lt;img src=-images/100px.gif- /&gt;</p>
252
+ <p>&lt;img src=_images/100px.gif_ /&gt;</p>
253
+ <p>&lt;img src='images/100px.gif' /&gt;</p>
254
+ <p>&lt;img src='/images/100px.gif' /&gt;</p>
255
+ <p>&lt;img src='../images/100px.gif' /&gt;</p>
256
+ <p>&lt;img src='../../images/100px.gif' /&gt;</p>
257
+ <p>&lt;img src='../../../images/100px.gif' /&gt;</p>
258
+ <p>&lt;img src='http://example.com/images/100px.gif' /&gt;</p>
259
+ <p>&lt;img src='aimages/100px.gifa' /&gt;</p>
260
+ <p>&lt;img src='1images/100px.gif1' /&gt;</p>
261
+ <p>&lt;img src='.images/100px.gif.' /&gt;</p>
262
+ <p>&lt;img src='-images/100px.gif-' /&gt;</p>
263
+ <p>&lt;img src='_images/100px.gif_' /&gt;</p>
264
+ <p>&lt;img src="images/100px.gif" /&gt;</p>
265
+ <p>&lt;img src="/images/100px.gif" /&gt;</p>
266
+ <p>&lt;img src="../images/100px.gif" /&gt;</p>
267
+ <p>&lt;img src="../../images/100px.gif" /&gt;</p>
268
+ <p>&lt;img src="../../../images/100px.gif" /&gt;</p>
269
+ <p>&lt;img src="http://example.com/images/100px.gif" /&gt;</p>
270
+ <p>&lt;img src="aimages/100px.gifa" /&gt;</p>
271
+ <p>&lt;img src="1images/100px.gif1" /&gt;</p>
272
+ <p>&lt;img src=".images/100px.gif." /&gt;</p>
273
+ <p>&lt;img src="-images/100px.gif-" /&gt;</p>
274
+ <p>&lt;img src="_images/100px.gif_" /&gt;</p>
275
+ <p>background-image:url(images/100px.gif);</p>
276
+ <p>background-image:url(/images/100px.gif);</p>
277
+ <p>background-image:url(../images/100px.gif);</p>
278
+ <p>background-image:url(../../images/100px.gif);</p>
279
+ <p>background-image:url(../../../images/100px.gif);</p>
280
+ <p>background-image:url(http://example.com/images/100px.gif);</p>
281
+ <p>background-image:url(aimages/100px.gifa);</p>
282
+ <p>background-image:url(1images/100px.gif1);</p>
283
+ <p>background-image:url(.images/100px.gif.);</p>
284
+ <p>background-image:url(-images/100px.gif-);</p>
285
+ <p>background-image:url(_images/100px.gif_);</p>
286
+ <p>background-image:url('images/100px.gif');</p>
287
+ <p>background-image:url('/images/100px.gif');</p>
288
+ <p>background-image:url('../images/100px.gif');</p>
289
+ <p>background-image:url('../../images/100px.gif');</p>
290
+ <p>background-image:url('../../../images/100px.gif');</p>
291
+ <p>background-image:url('http://example.com/images/100px.gif');</p>
292
+ <p>background-image:url('aimages/100px.gifa');</p>
293
+ <p>background-image:url('1images/100px.gif1');</p>
294
+ <p>background-image:url('.images/100px.gif.');</p>
295
+ <p>background-image:url('-images/100px.gif-');</p>
296
+ <p>background-image:url('_images/100px.gif_');</p>
297
+ <p>background-image:url("images/100px.gif");</p>
298
+ <p>background-image:url("/images/100px.gif");</p>
299
+ <p>background-image:url("../images/100px.gif");</p>
300
+ <p>background-image:url("../../images/100px.gif");</p>
301
+ <p>background-image:url("../../../images/100px.gif");</p>
302
+ <p>background-image:url("http://example.com/images/100px.gif");</p>
303
+ <p>background-image:url("aimages/100px.gifa");</p>
304
+ <p>background-image:url("1images/100px.gif1");</p>
305
+ <p>background-image:url(".images/100px.gif.");</p>
306
+ <p>background-image:url("-images/100px.gif-");</p>
307
+ <p>background-image:url("_images/100px.gif_");</p>
308
+ <br /><br /><br />