summaryrefslogtreecommitdiff
path: root/test/test-pages
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2016-12-11 12:22:14 +0000
committerAndres Rey <[email protected]>2016-12-11 12:22:14 +0000
commita1ecd476b867180002a51e6c61154dfad0aebad0 (patch)
treed88bf2790402a5a053d6ba00d277393cafec9596 /test/test-pages
parent7acb69c7f6391fa2121466cd4d013727dac64e36 (diff)
Adjusted more result test cases
Diffstat (limited to 'test/test-pages')
-rw-r--r--test/test-pages/002/expected.html51
-rw-r--r--test/test-pages/ars-1/expected.html16
-rw-r--r--test/test-pages/base-url/expected.html52
-rw-r--r--test/test-pages/basic-tags-cleaning/expected.html27
-rw-r--r--test/test-pages/bbc-1/expected.html68
-rw-r--r--test/test-pages/buzzfeed-1/expected.html77
-rw-r--r--test/test-pages/comment-inside-script-parsing/expected.html26
-rw-r--r--test/test-pages/daringfireball-1/expected.html54
8 files changed, 197 insertions, 174 deletions
diff --git a/test/test-pages/002/expected.html b/test/test-pages/002/expected.html
index 25820a5..964d7d6 100644
--- a/test/test-pages/002/expected.html
+++ b/test/test-pages/002/expected.html
@@ -29,7 +29,8 @@
<p>The most useful, high-level part of the Fetch API is the <code>fetch()</code> function.
In its simplest form it takes a URL and returns a promise that resolves
to the response. The response is captured as a <code>Response</code> object.</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">fetch<span style="color: #009900;">(</span><span style="color: #3366CC;">"/data.json"</span><span style="color: #009900;">)</span>.<span style="color: #660066;">then</span><span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>res<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">fetch<span style="color: #009900;">(</span><span style="color: #3366CC;">"/data.json"</span><span style="color: #009900;">)</span>.<span style="color: #660066;">then</span><span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>res<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
<span style="color: #006600; font-style: italic;">// res instanceof Response == true.</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>res.<span style="color: #660066;">ok</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
res.<span style="color: #660066;">json</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>.<span style="color: #660066;">then</span><span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>data<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
@@ -44,7 +45,8 @@
</td>
</tr></tbody></table></div>
<p>Submitting some parameters, it would look like this:</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">fetch<span style="color: #009900;">(</span><span style="color: #3366CC;">"http://www.example.org/submit.php"</span><span style="color: #339933;">,</span> <span style="color: #009900;">{</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">fetch<span style="color: #009900;">(</span><span style="color: #3366CC;">"http://www.example.org/submit.php"</span><span style="color: #339933;">,</span> <span style="color: #009900;">{</span>
method<span style="color: #339933;">:</span> <span style="color: #3366CC;">"POST"</span><span style="color: #339933;">,</span>
headers<span style="color: #339933;">:</span> <span style="color: #009900;">{</span>
<span style="color: #3366CC;">"Content-Type"</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">"application/x-www-form-urlencoded"</span>
@@ -76,7 +78,8 @@
<br></br>supporting CORS rules and ensuring cookies aren’t readable by third parties.</p>
<p>The <a href="https://fetch.spec.whatwg.org/#headers-class">Headers interface</a> is
a simple multi-map of names to values:</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> content <span style="color: #339933;">=</span> <span style="color: #3366CC;">"Hello World"</span><span style="color: #339933;">;</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> content <span style="color: #339933;">=</span> <span style="color: #3366CC;">"Hello World"</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> reqHeaders <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Headers<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
reqHeaders.<span style="color: #660066;">append</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Content-Type"</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"text/plain"</span>
reqHeaders.<span style="color: #660066;">append</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Content-Length"</span><span style="color: #339933;">,</span> content.<span style="color: #660066;">length</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
@@ -86,7 +89,8 @@ reqHeaders.<span style="color: #660066;">append</span><span style="color: #00990
<p>The same can be achieved by passing an array of arrays or a JS object
literal
<br></br>to the constructor:</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">reqHeaders <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Headers<span style="color: #009900;">(</span><span style="color: #009900;">{</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">reqHeaders <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Headers<span style="color: #009900;">(</span><span style="color: #009900;">{</span>
<span style="color: #3366CC;">"Content-Type"</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">"text/plain"</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">"Content-Length"</span><span style="color: #339933;">:</span> content.<span style="color: #660066;">length</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">"X-Custom-Header"</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">"ProcessThisImmediately"</span><span style="color: #339933;">,</span>
@@ -94,7 +98,8 @@ reqHeaders.<span style="color: #660066;">append</span><span style="color: #00990
</td>
</tr></tbody></table></div>
<p>The contents can be queried and retrieved:</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>reqHeaders.<span style="color: #660066;">has</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Content-Type"</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// true</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>reqHeaders.<span style="color: #660066;">has</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Content-Type"</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// true</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>reqHeaders.<span style="color: #660066;">has</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Set-Cookie"</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// false</span>
reqHeaders.<span style="color: #000066; font-weight: bold;">set</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Content-Type"</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"text/html"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
reqHeaders.<span style="color: #660066;">append</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"X-Custom-Header"</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"AnotherValue"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
@@ -130,7 +135,8 @@ console.<span style="color: #660066;">log</span><span style="color: #009900;">(<
<p>All of the Headers methods throw TypeError if <code>name</code> is not a
<a href="https://fetch.spec.whatwg.org/#concept-header-name">valid HTTP Header name</a>. The mutation operations will throw TypeError
if there is an immutable guard. Otherwise they fail silently. For example:</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> res <span style="color: #339933;">=</span> Response.<span style="color: #660066;">error</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> res <span style="color: #339933;">=</span> Response.<span style="color: #660066;">error</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">{</span>
res.<span style="color: #660066;">headers</span>.<span style="color: #000066; font-weight: bold;">set</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Origin"</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"http://mybank.com"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span> <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">(</span>e<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
@@ -146,7 +152,8 @@ console.<span style="color: #660066;">log</span><span style="color: #009900;">(<
a body, a request mode, credentials and cache hints.</p>
<p>The simplest Request is of course, just a URL, as you may do to GET a
resource.</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> req <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Request<span style="color: #009900;">(</span><span style="color: #3366CC;">"/index.html"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> req <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Request<span style="color: #009900;">(</span><span style="color: #3366CC;">"/index.html"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>req.<span style="color: #660066;">method</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// "GET"</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>req.<span style="color: #660066;">url</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// "http://example.com/index.html"</span></pre>
</td>
@@ -156,7 +163,8 @@ console.<span style="color: #660066;">log</span><span style="color: #009900;">(<
<br></br>(This is not the same as calling the <code>clone()</code> method, which
is covered in
<br></br>the “Reading bodies” section.).</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> copy <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Request<span style="color: #009900;">(</span>req<span style="color: #009900;">)</span><span style="color: #339933;">;</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> copy <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Request<span style="color: #009900;">(</span>req<span style="color: #009900;">)</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>copy.<span style="color: #660066;">method</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// "GET"</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>copy.<span style="color: #660066;">url</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// "http://example.com/index.html"</span></pre>
</td>
@@ -165,7 +173,8 @@ console.<span style="color: #660066;">log</span><span style="color: #009900;">(<
<p>The non-URL attributes of the <code>Request</code> can only be set by passing
initial
<br></br>values as a second argument to the constructor. This argument is a dictionary.</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> uploadReq <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Request<span style="color: #009900;">(</span><span style="color: #3366CC;">"/uploadImage"</span><span style="color: #339933;">,</span> <span style="color: #009900;">{</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> uploadReq <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Request<span style="color: #009900;">(</span><span style="color: #3366CC;">"/uploadImage"</span><span style="color: #339933;">,</span> <span style="color: #009900;">{</span>
method<span style="color: #339933;">:</span> <span style="color: #3366CC;">"POST"</span><span style="color: #339933;">,</span>
headers<span style="color: #339933;">:</span> <span style="color: #009900;">{</span>
<span style="color: #3366CC;">"Content-Type"</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">"image/png"</span><span style="color: #339933;">,</span>
@@ -182,7 +191,8 @@ console.<span style="color: #660066;">log</span><span style="color: #009900;">(<
origin with this mode set, the result is simply an error. You could use
this to ensure that
<br></br>a request is always being made to your origin.</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> arbitraryUrl <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"url-input"</span><span style="color: #009900;">)</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> arbitraryUrl <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"url-input"</span><span style="color: #009900;">)</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
fetch<span style="color: #009900;">(</span>arbitraryUrl<span style="color: #339933;">,</span> <span style="color: #009900;">{</span> mode<span style="color: #339933;">:</span> <span style="color: #3366CC;">"same-origin"</span> <span style="color: #009900;">}</span><span style="color: #009900;">)</span>.<span style="color: #660066;">then</span><span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>res<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Response succeeded?"</span><span style="color: #339933;">,</span> res.<span style="color: #660066;">ok</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>e<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
@@ -207,7 +217,8 @@ fetch<span style="color: #009900;">(</span>arbitraryUrl<span style="color: #3399
headers is exposed in the Response, but the body is readable. For example,
you could get a list of Flickr’s <a href="https://www.flickr.com/services/api/flickr.interestingness.getList.html">most interesting</a> photos
today like this:</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> u <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> URLSearchParams<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> u <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> URLSearchParams<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
u.<span style="color: #660066;">append</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'method'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'flickr.interestingness.getList'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
u.<span style="color: #660066;">append</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'api_key'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&lt;insert api key here&gt;'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
u.<span style="color: #660066;">append</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'format'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'json'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
@@ -230,7 +241,8 @@ apiCall.<span style="color: #660066;">then</span><span style="color: #009900;">(
<p>You may not read out the “Date” header since Flickr does not allow it
via
<br></br><code>Access-Control-Expose-Headers</code>.</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">response.<span style="color: #660066;">headers</span>.<span style="color: #000066; font-weight: bold;">get</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Date"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// null</span></pre>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">response.<span style="color: #660066;">headers</span>.<span style="color: #000066; font-weight: bold;">get</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"Date"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// null</span></pre>
</td>
</tr></tbody></table></div>
<p>The <code>credentials</code> enumeration determines if cookies for the other
@@ -284,7 +296,8 @@ apiCall.<span style="color: #660066;">then</span><span style="color: #009900;">(
The
<br></br>idiomatic way to return a Response to an intercepted request in ServiceWorkers
is:</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">addEventListener<span style="color: #009900;">(</span><span style="color: #3366CC;">'fetch'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>event<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">addEventListener<span style="color: #009900;">(</span><span style="color: #3366CC;">'fetch'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>event<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
event.<span style="color: #660066;">respondWith</span><span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">new</span> Response<span style="color: #009900;">(</span><span style="color: #3366CC;">"Response body"</span><span style="color: #339933;">,</span> <span style="color: #009900;">{</span>
headers<span style="color: #339933;">:</span> <span style="color: #009900;">{</span> <span style="color: #3366CC;">"Content-Type"</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">"text/plain"</span> <span style="color: #009900;">}</span>
<span style="color: #009900;">}</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
@@ -334,7 +347,8 @@ apiCall.<span style="color: #660066;">then</span><span style="color: #009900;">(
</ul><p>This is a significant improvement over XHR in terms of ease of use of
non-text data!</p>
<p>Request bodies can be set by passing <code>body</code> parameters:</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> form <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> FormData<span style="color: #009900;">(</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'login-form'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> form <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> FormData<span style="color: #009900;">(</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'login-form'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
fetch<span style="color: #009900;">(</span><span style="color: #3366CC;">"/login"</span><span style="color: #339933;">,</span> <span style="color: #009900;">{</span>
method<span style="color: #339933;">:</span> <span style="color: #3366CC;">"POST"</span><span style="color: #339933;">,</span>
body<span style="color: #339933;">:</span> form
@@ -342,7 +356,8 @@ fetch<span style="color: #009900;">(</span><span style="color: #3366CC;">"/login
</td>
</tr></tbody></table></div>
<p>Responses take the first argument as the body.</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> res <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Response<span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">new</span> File<span style="color: #009900;">(</span><span style="color: #009900;">[</span><span style="color: #3366CC;">"chunk"</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"chunk"</span><span style="color: #009900;">]</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"archive.zip"</span><span style="color: #339933;">,</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> res <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Response<span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">new</span> File<span style="color: #009900;">(</span><span style="color: #009900;">[</span><span style="color: #3366CC;">"chunk"</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"chunk"</span><span style="color: #009900;">]</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">"archive.zip"</span><span style="color: #339933;">,</span>
<span style="color: #009900;">{</span> type<span style="color: #339933;">:</span> <span style="color: #3366CC;">"application/zip"</span> <span style="color: #009900;">}</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></pre>
</td>
</tr></tbody></table></div>
@@ -356,7 +371,8 @@ fetch<span style="color: #009900;">(</span><span style="color: #3366CC;">"/login
<p>It is important to realise that Request and Response bodies can only be
read once! Both interfaces have a boolean attribute <code>bodyUsed</code> to
determine if it is safe to read or not.</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> res <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Response<span style="color: #009900;">(</span><span style="color: #3366CC;">"one time use"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> res <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Response<span style="color: #009900;">(</span><span style="color: #3366CC;">"one time use"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>res.<span style="color: #660066;">bodyUsed</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// false</span>
res.<span style="color: #660066;">text</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>.<span style="color: #660066;">then</span><span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>v<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>res.<span style="color: #660066;">bodyUsed</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// true</span>
@@ -381,7 +397,8 @@ res.<span style="color: #660066;">text</span><span style="color: #009900;">(</sp
will return a clone of the object, with a ‘new’ body. <code>clone()</code> MUST
be called before the body of the corresponding object has been used. That
is, <code>clone()</code> first, read later.</p>
- <div class="wp_syntax"><table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">addEventListener<span style="color: #009900;">(</span><span style="color: #3366CC;">'fetch'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
+ <div class="wp_syntax">
+ <table><tbody><tr><td class="code"><pre class="javascript" style="font-family:monospace;">addEventListener<span style="color: #009900;">(</span><span style="color: #3366CC;">'fetch'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
<span style="color: #000066; font-weight: bold;">var</span> sheep <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> Response<span style="color: #009900;">(</span><span style="color: #3366CC;">"Dolly"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">(</span>sheep.<span style="color: #660066;">bodyUsed</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// false</span>
<span style="color: #000066; font-weight: bold;">var</span> clone <span style="color: #339933;">=</span> sheep.<span style="color: #660066;">clone</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
diff --git a/test/test-pages/ars-1/expected.html b/test/test-pages/ars-1/expected.html
index 324787f..2ed436e 100644
--- a/test/test-pages/ars-1/expected.html
+++ b/test/test-pages/ars-1/expected.html
@@ -1,8 +1,12 @@
-<div class="article-content clearfix" itemprop="articleBody"><figure class="intro-image image center full-width" style="width:640px"><img height="331" src="http://cdn.arstechnica.net/wp-content/uploads/2015/04/server-crash-640x426.jpg" width="640"></img><figcaption class="caption">
- </figcaption></figure><p>A flaw in the wildly popular online game <em>Minecraft</em> makes it easy for just about anyone to crash the server hosting the game, according to a computer programmer who has released proof-of-concept code that exploits the vulnerability.</p><p>"I thought a lot before writing this post," Pakistan-based developer Ammar Askar wrote in a <a href="http://blog.ammaraskar.com/minecraft-vulnerability-advisory">blog post published Thursday</a>, 21 months, he said, after privately reporting the bug to <em>Minecraft</em> developer Mojang. "On the one hand I don't want to expose thousands of servers to a major vulnerability, yet on the other hand Mojang has failed to act on it."</p><p>The bug resides in the <a href="https://github.com/ammaraskar/pyCraft">networking internals of the <em>Minecraft </em>protocol</a>. It allows the contents of inventory slots to be exchanged, so that, among other things, items in players' hotbars are displayed automatically after logging in. <em>Minecraft</em> items can also store arbitrary metadata in a file format known as <a href="http://wiki.vg/NBT">Named Binary Tag (NBT)</a>, which allows complex data structures to be kept in hierarchical nests. Askar has released <a href="https://github.com/ammaraskar/pyCraft/tree/nbt_exploit">proof-of-concept attack code</a> he said exploits the vulnerability to crash any server hosting the game. Here's how it works.</p><blockquote>
+<div class="article-content clearfix" itemprop="articleBody">
+ <figure class="intro-image image center full-width" style="width:640px"><img height="331" src="http://cdn.arstechnica.net/wp-content/uploads/2015/04/server-crash-640x426.jpg" width="640"></img><figcaption class="caption">
+ </figcaption></figure><p>A flaw in the wildly popular online game <em>Minecraft</em> makes it easy for just about anyone to crash the server hosting the game, according to a computer programmer who has released proof-of-concept code that exploits the vulnerability.</p>
+ <p>"I thought a lot before writing this post," Pakistan-based developer Ammar Askar wrote in a <a href="http://blog.ammaraskar.com/minecraft-vulnerability-advisory">blog post published Thursday</a>, 21 months, he said, after privately reporting the bug to <em>Minecraft</em> developer Mojang. "On the one hand I don't want to expose thousands of servers to a major vulnerability, yet on the other hand Mojang has failed to act on it."</p>
+ <p>The bug resides in the <a href="https://github.com/ammaraskar/pyCraft">networking internals of the <em>Minecraft </em>protocol</a>. It allows the contents of inventory slots to be exchanged, so that, among other things, items in players' hotbars are displayed automatically after logging in. <em>Minecraft</em> items can also store arbitrary metadata in a file format known as <a href="http://wiki.vg/NBT">Named Binary Tag (NBT)</a>, which allows complex data structures to be kept in hierarchical nests. Askar has released <a href="https://github.com/ammaraskar/pyCraft/tree/nbt_exploit">proof-of-concept attack code</a> he said exploits the vulnerability to crash any server hosting the game. Here's how it works.</p>
+ <blockquote>
<p>The vulnerability stems from the fact that the client is allowed to send the server information about certain slots. This, coupled with the NBT format’s nesting allows us to <em>craft</em> a packet that is incredibly complex for the server to deserialize but trivial for us to generate.</p>
<p>In my case, I chose to create lists within lists, down to five levels. This is a json representation of what it looks like.</p>
- <div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nx">rekt</span><span class="o">:</span> <span class="p">{</span>
+ <div class="highlight"> <pre><code class="language-javascript" data-lang="javascript"><span class="nx">rekt</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">list</span><span class="o">:</span> <span class="p">[</span>
<span class="nx">list</span><span class="o">:</span> <span class="p">[</span>
<span class="nx">list</span><span class="o">:</span> <span class="p">[</span>
@@ -27,7 +31,7 @@
<span class="p">...</span>
<span class="p">]</span>
<span class="p">...</span>
-<span class="p">}</span></code></pre><p> </p></div>
+<span class="p">}</span></code></pre> </div>
<p>The root of the object, <code>rekt</code>, contains 300 lists. Each list has a list with 10 sublists, and each of those sublists has 10 of their own, up until 5 levels of recursion. That’s a total of <code>10^5 * 300 = 30,000,000</code> lists.</p>
<p>And this isn’t even the theoretical maximum for this attack. Just the nbt data for this payload is 26.6 megabytes. But luckily Minecraft implements a way to compress large packets, lucky us! zlib shrinks down our evil data to a mere 39 kilobytes.</p>
<p>Note: in previous versions of Minecraft, there was no protocol wide compression for big packets. Previously, NBT was sent compressed with gzip and prefixed with a signed short of its length, which reduced our maximum payload size to <code>2^15 - 1</code>. Now that the length is a varint capable of storing integers up to <code>2^28</code>, our potential for attack has increased significantly.</p>
@@ -35,4 +39,6 @@
<p>This vulnerability exists on almost all previous and current Minecraft versions as of 1.8.3, the packets used as attack vectors are the <a href="http://wiki.vg/Protocol#Player_Block_Placement">0x08: Block Placement Packet</a> and <a href="http://wiki.vg/Protocol#Creative_Inventory_Action">0x10: Creative Inventory Action</a>.</p>
<p>The fix for this vulnerability isn’t exactly that hard, the client should never really send a data structure as complex as NBT of arbitrary size and if it must, some form of recursion and size limits should be implemented.</p>
<p>These were the fixes that I recommended to Mojang 2 years ago.</p>
- </blockquote><p>Ars is asking Mojang for comment and will update this post if company officials respond.</p></div> \ No newline at end of file
+ </blockquote>
+ <p>Ars is asking Mojang for comment and will update this post if company officials respond.</p>
+ </div> \ No newline at end of file
diff --git a/test/test-pages/base-url/expected.html b/test/test-pages/base-url/expected.html
index 0e700cc..ee61616 100644
--- a/test/test-pages/base-url/expected.html
+++ b/test/test-pages/base-url/expected.html
@@ -1,19 +1,33 @@
- <article>
- <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p>
- <p>Links</p>
- <p><a href="http://fakehost/test/foo/bar/baz.html">link</a></p>
- <p><a href="http://fakehost/test/foo/bar/baz.html">link</a></p>
- <p><a href="http://fakehost/foo/bar/baz.html">link</a></p>
- <p><a href="#foo">link</a></p>
- <p><a href="http://fakehost/test/baz.html#foo">link</a></p>
- <p><a href="http://fakehost/foo/bar/baz.html#foo">link</a></p>
- <p><a href="http://test/foo/bar/baz.html">link</a></p>
- <p><a href="https://test/foo/bar/baz.html">link</a></p>
- <p>Images</p>
- <p><img src="http://fakehost/test/foo/bar/baz.png"/></p>
- <p><img src="http://fakehost/test/foo/bar/baz.png"/></p>
- <p><img src="http://fakehost/foo/bar/baz.png"/></p>
- <p><img src="http://test/foo/bar/baz.png"/></p>
- <p><img src="https://test/foo/bar/baz.png"/></p>
- <p> Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p>
- </article> \ No newline at end of file
+<article>
+ <p>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ </p>
+ <p>Links</p>
+ <p><a href="http://fakehost/test/foo/bar/baz.html">link</a></p>
+ <p><a href="http://fakehost/test/foo/bar/baz.html">link</a></p>
+ <p><a href="http://fakehost/foo/bar/baz.html">link</a></p>
+ <p><a href="#foo">link</a></p>
+ <p><a href="http://fakehost/test/baz.html#foo">link</a></p>
+ <p><a href="http://fakehost/foo/bar/baz.html#foo">link</a></p>
+ <p><a href="http://test/foo/bar/baz.html">link</a></p>
+ <p><a href="https://test/foo/bar/baz.html">link</a></p>
+ <p>Images</p>
+ <p><img src="http://fakehost/test/foo/bar/baz.png"/></p>
+ <p><img src="http://fakehost/test/foo/bar/baz.png"/></p>
+ <p><img src="http://fakehost/foo/bar/baz.png"/></p>
+ <p><img src="http://test/foo/bar/baz.png"/></p>
+ <p><img src="https://test/foo/bar/baz.png"/></p>
+
+ <p>
+ Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ </p>
+</article> \ No newline at end of file
diff --git a/test/test-pages/basic-tags-cleaning/expected.html b/test/test-pages/basic-tags-cleaning/expected.html
index 11a4c51..2701fed 100644
--- a/test/test-pages/basic-tags-cleaning/expected.html
+++ b/test/test-pages/basic-tags-cleaning/expected.html
@@ -1,8 +1,19 @@
- <div>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
- <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
- <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </div>
- <div>
- <p>Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
- <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> \ No newline at end of file
+<div>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua.</p>
+ <p>Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat.</p>
+
+ <p>Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div><div>
+ <p>Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat.</p>
+
+ <p>Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div> \ No newline at end of file
diff --git a/test/test-pages/bbc-1/expected.html b/test/test-pages/bbc-1/expected.html
index d02b259..a3596bb 100644
--- a/test/test-pages/bbc-1/expected.html
+++ b/test/test-pages/bbc-1/expected.html
@@ -1,57 +1,17 @@
- <div class="story-body__inner" property="articleBody">
- <p class="story-body__introduction">President Barack Obama has admitted that his failure to pass "common sense gun safety laws" in the US is the greatest frustration of his presidency. </p>
- <p>In an interview with the BBC, Mr Obama said it was "distressing" not to have made progress on the issue "even in the face of repeated mass killings".</p>
- <p>He vowed to keep trying, but the BBC's North America editor Jon Sopel said the president did not sound very confident. </p>
- <p>However, Mr Obama said race relations had improved during his presidency. </p>
- <p>Hours after the interview, a gunman opened fire at a cinema in the US state of Louisiana, killing two people and injuring several others before shooting himself.</p>
- <p>In a wide-ranging interview, President Obama also said:</p>
- <ul class="story-body__unordered-list">
- <li class="story-body__list-item"> <a href="http://www.bbc.co.uk/news/uk-politics-33647154" class="story-body__link">The UK must stay in the EU</a> to have influence on the world stage</li>
- <li class="story-body__list-item">He is confident the Iran nuclear deal will be passed by Congress </li>
- <li class="story-body__list-item">Syria needs a political solution in order to defeat the Islamic State group</li>
- <li class="story-body__list-item">He would speak "bluntly" against corruption <a href="http://www.bbc.co.uk/news/world-us-canada-33646563" class="story-body__link">and human rights violations in Kenya</a> </li>
- <li class="story-body__list-item">He would defend his advocacy of gay rights following protests in Kenya</li>
- <li class="story-body__list-item">Despite racial tensions, the US is becoming more diverse and more tolerant</li>
- </ul>
- <p><a href="http://www.bbc.co.uk/news/world-us-canada-33646542" class="story-body__link">Read the full transcript of his interview</a></p>
- <p>Mr Obama lands in Kenya later on Friday for his first visit since becoming president. </p>
- <p>But with just 18 months left in power, he said gun control was the area where he has been "most frustrated and most stymied" since coming to power in 2009.</p>
- <p>"If you look at the number of Americans killed since 9/11 by terrorism, it's less than 100. If you look at the number that have been killed by gun violence, it's in the tens of thousands," Mr Obama said. </p>
- <figure class="media-landscape full-width has-caption"><img src="http://ichef.bbci.co.uk/news/555/cpsprodpb/462D/production/_84456971_gettyimages-167501087.jpg" datasrc="http://ichef.bbci.co.uk/news/976/cpsprodpb/462D/production/_84456971_gettyimages-167501087.jpg" class="js-image-replace" alt="Gun control campaigners protest in McPhearson Square in Washington DC - 25 April 2013" height="549" width="976"/>
- <figcaption class="media-caption"> <span class="media-caption__text">
+<div class="story-body__inner" property="articleBody">
+ <p class="story-body__introduction">President Barack Obama has admitted that his failure to pass "common sense gun safety laws" in the US is the greatest frustration of his presidency. </p><p>In an interview with the BBC, Mr Obama said it was "distressing" not to have made progress on the issue "even in the face of repeated mass killings".</p><p>He vowed to keep trying, but the BBC's North America editor Jon Sopel said the president did not sound very confident. </p><p>However, Mr Obama said race relations had improved during his presidency. </p><p>Hours after the interview, a gunman opened fire at a cinema in the US state of Louisiana, killing two people and injuring several others before shooting himself.</p><p>In a wide-ranging interview, President Obama also said:</p><ul class="story-body__unordered-list"><li class="story-body__list-item">
+<a class="story-body__link" href="http://www.bbc.co.uk/news/uk-politics-33647154">The UK must stay in the EU</a> to have influence on the world stage</li>
+<li class="story-body__list-item">He is confident the Iran nuclear deal will be passed by Congress </li>
+<li class="story-body__list-item">Syria needs a political solution in order to defeat the Islamic State group</li>
+<li class="story-body__list-item">He would speak "bluntly" against corruption <a class="story-body__link" href="http://www.bbc.co.uk/news/world-us-canada-33646563">and human rights violations in Kenya</a>
+</li>
+<li class="story-body__list-item">He would defend his advocacy of gay rights following protests in Kenya</li>
+<li class="story-body__list-item">Despite racial tensions, the US is becoming more diverse and more tolerant</li>
+</ul><p><a class="story-body__link" href="http://www.bbc.co.uk/news/world-us-canada-33646542">Read the full transcript of his interview</a></p><p>Mr Obama lands in Kenya later on Friday for his first visit since becoming president. </p><p>But with just 18 months left in power, he said gun control was the area where he has been "most frustrated and most stymied" since coming to power in 2009.</p><p>"If you look at the number of Americans killed since 9/11 by terrorism, it's less than 100. If you look at the number that have been killed by gun violence, it's in the tens of thousands," Mr Obama said. </p><figure class="media-landscape full-width has-caption"><img alt="Gun control campaigners protest in McPhearson Square in Washington DC - 25 April 2013" class="js-image-replace" datasrc="http://ichef.bbci.co.uk/news/976/cpsprodpb/462D/production/_84456971_gettyimages-167501087.jpg" height="549" src="http://ichef.bbci.co.uk/news/555/cpsprodpb/462D/production/_84456971_gettyimages-167501087.jpg" width="976"></img><figcaption class="media-caption"><span class="media-caption__text">
The president said he would continue fighting for greater gun control laws
- </span> </figcaption>
- </figure>
- <p>"For us not to be able to resolve that issue has been something that is distressing," he added. </p>
- <p>Mr Obama has pushed for stricter gun control throughout his presidency but has been unable to secure any significant changes to the laws. </p>
- <p>After nine African-American churchgoers were killed in South Carolina in June, he admitted "politics in this town" meant there were few options available.</p>
- <figure class="media-landscape body-width no-caption"><img src="http://ichef.bbci.co.uk/news/555/media/images/76020000/jpg/_76020974_line976.jpg" datasrc="http://ichef.bbci.co.uk/news/464/media/images/76020000/jpg/_76020974_line976.jpg" class="js-image-replace" alt="line" height="2" width="464"/></figure>
- <h2 class="story-body__crosshead">Analysis: Jon Sopel, BBC News, Washington</h2>
- <figure class="media-landscape full-width no-caption"><img src="http://ichef-1.bbci.co.uk/news/555/cpsprodpb/6D3D/production/_84456972_p072315al-0500.jpg" datasrc="http://ichef-1.bbci.co.uk/news/976/cpsprodpb/6D3D/production/_84456972_p072315al-0500.jpg" class="js-image-replace" alt="President Barack Obama participates in an interview with Jon Sopel of BBC in the Roosevelt Room of the White House - 23 July 2015" height="549" width="976"/></figure>
- <p>Nine months ago, the president seemed like a spent force, after taking a beating in the midterm elections, during which members of his own party were reluctant to campaign on his record. </p>
- <p>But the man sat before me today was relaxed and confident, buoyed by a string of "wins" on healthcare, Cuba and Iran, after bitter and ongoing battles with his many critics. </p>
- <p>The only body swerve the president performed was when I asked him <a href="http://www.bbc.co.uk/news/world-us-canada-33643168" class="story-body__link"> how many minds he had changed on the Iran nuclear deal </a>after an intense sell aimed at Gulf allies and members of US Congress who remain implacably opposed. </p>
- <p>There was a momentary flicker across the president's face as if to say "You think you got me?" before his smile returned and he proceeded to talk about how Congress would come round.</p>
- <p>But notably, he did not give a direct answer to that question, which leaves me with the impression that he has persuaded precisely zero.</p>
- <p><a href="http://www.bbc.co.uk/news/world-us-canada-33646875" class="story-body__link">Five things we learned from Obama interview</a></p>
- <p><a href="http://www.bbc.co.uk/news/world-us-canada-33646545" class="story-body__link">The presidential body swerve</a></p>
- <figure class="media-landscape body-width no-caption"><img src="http://ichef.bbci.co.uk/news/555/media/images/76020000/jpg/_76020974_line976.jpg" datasrc="http://ichef.bbci.co.uk/news/464/media/images/76020000/jpg/_76020974_line976.jpg" class="js-image-replace" alt="line" height="2" width="464"/></figure>
- <p>On race relations, Mr Obama said recent concerns around policing and mass incarcerations were "legitimate and deserve intense attention" but insisted progress had been made. </p>
- <p>Children growing up during the eight years of his presidency "will have a different view of race relations in this country and what's possible," he said. </p>
- <p>"There are going to be tensions that arise. But if you look at my daughters' generation, they have an attitude about race that's entirely different than even my generation."</p>
- <p>Talking about how he was feeling after his recent successes, he said "every president, every leader has strengths and weaknesses". </p>
- <p>"One of my strengths is I have a pretty even temperament. I don't get too high when it's high and I don't get too low when it's low," he said. </p>
- <figure class="media-landscape full-width has-caption"><img src="http://ichef-1.bbci.co.uk/news/555/cpsprodpb/142FD/production/_84458628_shirtreuters.jpg" datasrc="http://ichef-1.bbci.co.uk/news/976/cpsprodpb/142FD/production/_84458628_shirtreuters.jpg" class="js-image-replace" alt="Customer looks at Obama shirts at a stall in Nairobi's Kibera slums, 23 July 2015" height="549" width="976"/>
- <figcaption class="media-caption"> <span class="media-caption__text">
+ </span>
+ </figcaption></figure><p>"For us not to be able to resolve that issue has been something that is distressing," he added. </p><p>Mr Obama has pushed for stricter gun control throughout his presidency but has been unable to secure any significant changes to the laws. </p><p>After nine African-American churchgoers were killed in South Carolina in June, he admitted "politics in this town" meant there were few options available.</p><figure class="media-landscape body-width no-caption"><img alt="line" class="js-image-replace" datasrc="http://ichef.bbci.co.uk/news/464/media/images/76020000/jpg/_76020974_line976.jpg" height="2" src="http://ichef.bbci.co.uk/news/555/media/images/76020000/jpg/_76020974_line976.jpg" width="464"></img></figure><h2 class="story-body__crosshead">Analysis: Jon Sopel, BBC News, Washington</h2><figure class="media-landscape full-width no-caption"><img alt="President Barack Obama participates in an interview with Jon Sopel of BBC in the Roosevelt Room of the White House - 23 July 2015" class="js-image-replace" datasrc="http://ichef-1.bbci.co.uk/news/976/cpsprodpb/6D3D/production/_84456972_p072315al-0500.jpg" height="549" src="http://ichef-1.bbci.co.uk/news/555/cpsprodpb/6D3D/production/_84456972_p072315al-0500.jpg" width="976"></img></figure><p>Nine months ago, the president seemed like a spent force, after taking a beating in the midterm elections, during which members of his own party were reluctant to campaign on his record. </p><p>But the man sat before me today was relaxed and confident, buoyed by a string of "wins" on healthcare, Cuba and Iran, after bitter and ongoing battles with his many critics. </p><p>The only body swerve the president performed was when I asked him <a class="story-body__link" href="http://www.bbc.co.uk/news/world-us-canada-33643168"> how many minds he had changed on the Iran nuclear deal </a>after an intense sell aimed at Gulf allies and members of US Congress who remain implacably opposed. </p><p>There was a momentary flicker across the president's face as if to say "You think you got me?" before his smile returned and he proceeded to talk about how Congress would come round.</p><p>But notably, he did not give a direct answer to that question, which leaves me with the impression that he has persuaded precisely zero.</p><p><a class="story-body__link" href="http://www.bbc.co.uk/news/world-us-canada-33646875">Five things we learned from Obama interview</a></p><p><a class="story-body__link" href="http://www.bbc.co.uk/news/world-us-canada-33646545">The presidential body swerve</a></p><figure class="media-landscape body-width no-caption"><img alt="line" class="js-image-replace" datasrc="http://ichef.bbci.co.uk/news/464/media/images/76020000/jpg/_76020974_line976.jpg" height="2" src="http://ichef.bbci.co.uk/news/555/media/images/76020000/jpg/_76020974_line976.jpg" width="464"></img></figure><p>On race relations, Mr Obama said recent concerns around policing and mass incarcerations were "legitimate and deserve intense attention" but insisted progress had been made. </p><p>Children growing up during the eight years of his presidency "will have a different view of race relations in this country and what's possible," he said. </p><p>"There are going to be tensions that arise. But if you look at my daughters' generation, they have an attitude about race that's entirely different than even my generation."</p><p>Talking about how he was feeling after his recent successes, he said "every president, every leader has strengths and weaknesses". </p><p>"One of my strengths is I have a pretty even temperament. I don't get too high when it's high and I don't get too low when it's low," he said. </p><figure class="media-landscape full-width has-caption"><img alt="Customer looks at Obama shirts at a stall in Nairobi's Kibera slums, 23 July 2015" class="js-image-replace" datasrc="http://ichef-1.bbci.co.uk/news/976/cpsprodpb/142FD/production/_84458628_shirtreuters.jpg" height="549" src="http://ichef-1.bbci.co.uk/news/555/cpsprodpb/142FD/production/_84458628_shirtreuters.jpg" width="976"></img><figcaption class="media-caption"><span class="media-caption__text">
Kenya is getting ready to welcome the US president
- </span> </figcaption>
- </figure>
- <h2 class="story-body__crosshead">Kenya trip</h2>
- <p>Mr Obama was speaking to the BBC at the White House before departing for Kenya.</p>
- <p>His father was Kenyan and the president is expected to meet relatives in Nairobi.</p>
- <p>Mr Obama has faced criticism in the country after the US legalised gay marriage. However, in his interview, the president said he would not fall silent on the issue.</p>
- <p>"I am not a fan of discrimination and bullying of anybody on the basis of race, on the basis of religion, on the basis of sexual orientation or gender," he said.</p>
- <p>The president also admitted that some African governments, including Kenya's, needed to improve their records on human rights and democracy. However, he defended his decision to engage with and visit those governments. </p>
- <p>"Well, they're not ideal institutions. But what we found is, is that when we combined blunt talk with engagement, that gives us the best opportunity to influence and open up space for civil society." </p>
- <p>Mr Obama will become the first US president to address the African Union when he travels on to Ethiopia on Sunday.</p>
+ </span>
+ </figcaption></figure><h2 class="story-body__crosshead">Kenya trip</h2><p>Mr Obama was speaking to the BBC at the White House before departing for Kenya.</p><p>His father was Kenyan and the president is expected to meet relatives in Nairobi.</p><p>Mr Obama has faced criticism in the country after the US legalised gay marriage. However, in his interview, the president said he would not fall silent on the issue.</p><p>"I am not a fan of discrimination and bullying of anybody on the basis of race, on the basis of religion, on the basis of sexual orientation or gender," he said.</p><p>The president also admitted that some African governments, including Kenya's, needed to improve their records on human rights and democracy. However, he defended his decision to engage with and visit those governments. </p><p>"Well, they're not ideal institutions. But what we found is, is that when we combined blunt talk with engagement, that gives us the best opportunity to influence and open up space for civil society." </p><p>Mr Obama will become the first US president to address the African Union when he travels on to Ethiopia on Sunday.</p>
</div> \ No newline at end of file
diff --git a/test/test-pages/buzzfeed-1/expected.html b/test/test-pages/buzzfeed-1/expected.html
index fa0af8f..3601ef4 100644
--- a/test/test-pages/buzzfeed-1/expected.html
+++ b/test/test-pages/buzzfeed-1/expected.html
@@ -1,35 +1,42 @@
- <div id="buzz_sub_buzz" class="c suplist_article suplist_list_show ">
- <div class="buzz_superlist_item buzz_superlist_item_image buzz_superlist_item_wide image_hit no_caption " id="superlist_3758406_5547137" rel:buzz_num="1">
- <h2>The mother of a woman who took suspected diet pills bought online has described how her daughter was “literally burning up from within” moments before her death.</h2>
- <p class="article_caption_w_attr"> <span class="sub_buzz_source_via buzz_attribution buzz_attr_no_caption">West Merica Police</span></p>
- </div>
- <div class="buzz_superlist_item buzz_superlist_item_text buzz_superlist_item_wide " id="superlist_3758406_5547213" rel:buzz_num="2">
- <p class="sub_buzz_desc">Eloise Parry, 21, was taken to Royal Shrewsbury hospital on 12 April after taking a lethal dose of highly toxic “slimming tablets”. </p>
- <p>“The drug was in her system, there was no anti-dote, two tablets was a lethal dose – and she had taken eight,” her mother, Fiona, <a href="https://www.westmercia.police.uk/article/9501/A-tribute-to-Eloise-Aimee-Parry-written-by-her-mother-Fiona-Parry">said in a statement</a> yesterday.</p>
- <p>“As Eloise deteriorated, the staff in A&amp;E did all they could to stabilise her. As the drug kicked in and started to make her metabolism soar, they attempted to cool her down, but they were fighting an uphill battle.</p>
- <p>“She was literally burning up from within.”</p>
- <p>She added: “They never stood a chance of saving her. She burned and crashed.”</p>
- </div>
- <div class="buzz_superlist_item buzz_superlist_item_grid_row buzz_superlist_item_wide no_caption " id="superlist_3758406_5547140" rel:buzz_num="3">
- <div class="grid_row two_pl grid_height_l">
- <div class="grid_cell cell_1">
- <div class="grid_cell_image_wrapper"><img src="http://ak-hdl.buzzfed.com/static/2015-04/21/5/enhanced/webdr12/grid-cell-2501-1429608056-15.jpg" rel:bf_image_src="http://ak-hdl.buzzfed.com/static/2015-04/21/5/enhanced/webdr12/grid-cell-2501-1429608056-15.jpg" height="412" width="203"/></div>
- <p class="sub_buzz_grid_source_via">Facebook</p>
- </div>
- <div class="grid_cell cell_2">
- <div class="grid_cell_image_wrapper"><img src="http://ak-hdl.buzzfed.com/static/2015-04/21/5/enhanced/webdr12/grid-cell-2501-1429608057-18.jpg" rel:bf_image_src="http://ak-hdl.buzzfed.com/static/2015-04/21/5/enhanced/webdr12/grid-cell-2501-1429608057-18.jpg" height="412" width="412"/></div>
- <p class="sub_buzz_grid_source_via">Facebook</p>
- </div>
- </div>
- </div>
- <div class="buzz_superlist_item buzz_superlist_item_text buzz_superlist_item_wide " id="superlist_3758406_5547284" rel:buzz_num="4">
- <p class="sub_buzz_desc">West Mercia police <a href="https://www.westmercia.police.uk/article/9500/Warning-Issued-As-Shrewsbury-Woman-Dies-After-Taking-Suspected-Diet-Pills">said the tablets were believed to contain dinitrophenol</a>, known as DNP, which is a highly toxic industrial chemical. </p>
- <p>“We are undoubtedly concerned over the origin and sale of these pills and are working with partner agencies to establish where they were bought from and how they were advertised,” said chief inspector Jennifer Mattinson from the West Mercia police.</p>
- <p>The Food Standards Agency warned people to stay away from slimming products that contained DNP.</p>
- <p>“We advise the public not to take any tablets or powders containing DNP, as it is an industrial chemical and not fit for human consumption,” it said in a statement.</p>
- </div>
- <div class="buzz_superlist_item buzz_superlist_item_text buzz_superlist_item_wide " id="superlist_3758406_5547219" rel:buzz_num="5">
- <h2>Fiona Parry issued a plea for people to stay away from pills containing the chemical.</h2>
- <p class="sub_buzz_desc">“[Eloise] just never really understood how dangerous the tablets that she took were,” she said. “Most of us don’t believe that a slimming tablet could possibly kill us.</p>
- <p>“DNP is not a miracle slimming pill. It is a deadly toxin.”</p>
- </div> \ No newline at end of file
+<div class="c suplist_article suplist_list_show " id="buzz_sub_buzz">
+ <div class="buzz_superlist_item buzz_superlist_item_image buzz_superlist_item_wide image_hit no_caption " id="superlist_3758406_5547137" rel:buzz_num="1">
+ <h2>The mother of a woman who took suspected diet pills bought online has described how her daughter was “literally burning up from within” moments before her death.</h2>
+
+ <p class="article_caption_w_attr"> <span class="sub_buzz_source_via buzz_attribution buzz_attr_no_caption">West Merica Police</span></p>
+ </div>
+ <div class="buzz_superlist_item buzz_superlist_item_text buzz_superlist_item_wide " id="superlist_3758406_5547213" rel:buzz_num="2">
+ <p class="sub_buzz_desc">Eloise Parry, 21, was taken to Royal Shrewsbury hospital on 12 April after taking a lethal dose of highly toxic “slimming tablets”. </p>
+ <p>“The drug was in her system, there was no anti-dote, two tablets was a lethal dose – and she had taken eight,” her mother, Fiona, <a href="https://www.westmercia.police.uk/article/9501/A-tribute-to-Eloise-Aimee-Parry-written-by-her-mother-Fiona-Parry">said in a statement</a> yesterday.</p>
+ <p>“As Eloise deteriorated, the staff in A&amp;E did all they could to stabilise her. As the drug kicked in and started to make her metabolism soar, they attempted to cool her down, but they were fighting an uphill battle.</p>
+ <p>“She was literally burning up from within.”</p>
+ <p>She added: “They never stood a chance of saving her. She burned and crashed.”</p>
+ </div>
+ <div class="buzz_superlist_item buzz_superlist_item_grid_row buzz_superlist_item_wide no_caption " id="superlist_3758406_5547140" rel:buzz_num="3">
+ <div class="grid_row two_pl grid_height_l">
+ <div class="grid_cell cell_1">
+ <div class="grid_cell_image_wrapper">
+ <img height="412" rel:bf_image_src="http://ak-hdl.buzzfed.com/static/2015-04/21/5/enhanced/webdr12/grid-cell-2501-1429608056-15.jpg" src="http://ak-hdl.buzzfed.com/static/2015-04/21/5/enhanced/webdr12/grid-cell-2501-1429608056-15.jpg" width="203"></img>
+ </div>
+ <p class="sub_buzz_grid_source_via">Facebook</p>
+ </div>
+ <div class="grid_cell cell_2">
+ <div class="grid_cell_image_wrapper">
+ <img height="412" rel:bf_image_src="http://ak-hdl.buzzfed.com/static/2015-04/21/5/enhanced/webdr12/grid-cell-2501-1429608057-18.jpg" src="http://ak-hdl.buzzfed.com/static/2015-04/21/5/enhanced/webdr12/grid-cell-2501-1429608057-18.jpg" width="412"></img>
+ </div>
+ <p class="sub_buzz_grid_source_via">Facebook</p>
+ </div>
+
+ </div>
+ </div>
+ <div class="buzz_superlist_item buzz_superlist_item_text buzz_superlist_item_wide " id="superlist_3758406_5547284" rel:buzz_num="4">
+ <p class="sub_buzz_desc">West Mercia police <a href="https://www.westmercia.police.uk/article/9500/Warning-Issued-As-Shrewsbury-Woman-Dies-After-Taking-Suspected-Diet-Pills">said the tablets were believed to contain dinitrophenol</a>, known as DNP, which is a highly toxic industrial chemical. </p>
+ <p>“We are undoubtedly concerned over the origin and sale of these pills and are working with partner agencies to establish where they were bought from and how they were advertised,” said chief inspector Jennifer Mattinson from the West Mercia police.</p>
+ <p>The Food Standards Agency warned people to stay away from slimming products that contained DNP.</p>
+ <p>“We advise the public not to take any tablets or powders containing DNP, as it is an industrial chemical and not fit for human consumption,” it said in a statement.</p>
+ </div>
+ <div class="buzz_superlist_item buzz_superlist_item_text buzz_superlist_item_wide " id="superlist_3758406_5547219" rel:buzz_num="5">
+ <h2>Fiona Parry issued a plea for people to stay away from pills containing the chemical.</h2>
+ <br></br><p class="sub_buzz_desc">“[Eloise] just never really understood how dangerous the tablets that she took were,” she said. “Most of us don’t believe that a slimming tablet could possibly kill us.</p>
+ <p>“DNP is not a miracle slimming pill. It is a deadly toxin.”</p>
+ </div>
+ </div> \ No newline at end of file
diff --git a/test/test-pages/comment-inside-script-parsing/expected.html b/test/test-pages/comment-inside-script-parsing/expected.html
index 11a4c51..57c50c6 100644
--- a/test/test-pages/comment-inside-script-parsing/expected.html
+++ b/test/test-pages/comment-inside-script-parsing/expected.html
@@ -1,8 +1,18 @@
- <div>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
- <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
- <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </div>
- <div>
- <p>Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
- <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> \ No newline at end of file
+<div>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua.</p>
+ <p>Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat.</p>
+ <p>Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div><div>
+ <p>Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat.</p>
+ <p>Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur.
+ Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div> \ No newline at end of file
diff --git a/test/test-pages/daringfireball-1/expected.html b/test/test-pages/daringfireball-1/expected.html
index d87c6c7..c568880 100644
--- a/test/test-pages/daringfireball-1/expected.html
+++ b/test/test-pages/daringfireball-1/expected.html
@@ -1,28 +1,26 @@
- <div class="article">
- <p>Daring Fireball is written and produced by John Gruber.</p>
- <p>
- <a href="http://fakehost/graphics/author/addison-bw.jpg"> <img src="http://fakehost/graphics/author/addison-bw-425.jpg" alt="Photograph of the author."/></a>
- <br/><em>Portrait by <a href="http://superbiate.com/inquiries/">George Del Barrio</a></em> </p>
- <h2>Mac Apps</h2>
- <ul>
- <li><a href="http://www.barebones.com/products/bbedit/">BBEdit</a></li>
- <li><a href="http://www.flyingmeat.com/acorn/">Acorn</a></li>
- <li><a href="http://www.red-sweater.com/marsedit/">MarsEdit</a></li>
- <li><a href="http://aged-and-distilled.com/napkin/">Napkin</a></li>
- <li><a href="http://www.barebones.com/products/Yojimbo/">Yojimbo</a></li>
- <li><a href="http://www.panic.com/transmit/">Transmit</a></li>
- <li><a href="http://latenightsw.com/sd4/index.html">Script Debugger</a></li>
- <li><a href="http://www.ambrosiasw.com/utilities/snapzprox/">Snapz Pro X</a></li>
- <li><a href="http://nightly.webkit.org/">WebKit</a></li>
- </ul>
- <h2>iPhone Apps</h2>
- <ul>
- <li><a href="http://vesperapp.co/">Vesper</a></li>
- </ul>
- <h2>Server Software</h2>
- <p>The Daring Fireball website is hosted by <a href="http://joyent.com/">Joyent</a>.</p>
- <p>Articles and links are published through <a href="http://movabletype.org/">Movable Type</a>. In addition to my own SmartyPants and Markdown plug-ins, Daring Fireball uses several excellent Movable Type plug-ins, including Brad Choate’s <a href="http://bradchoate.com/weblog/2003/06/24/regular-expressions">MT-Regex</a> and <a href="http://bradchoate.com/weblog/2004/10/20/mtifempty">MT-IfEmpty</a>, and <a href="http://bumppo.net/projects/amputator/">Nat Irons’s Amputator</a>.</p>
- <p>Stats are tracked using <a href="http://haveamint.com/">Mint</a>. Additional web nerdery, including the membership system, is fueled by <a href="http://perl.org/">Perl</a>, <a href="http://www.php.net/">PHP</a>, and <a href="http://www.mysql.com/">MySQL</a>.</p>
- <h2>Web Standards</h2>
- <p>Web standards are important, and Daring Fireball adheres to them. Specifically, Daring Fireball’s HTML markup should validate as either <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML 5</a> or XHTML 4.01 Transitional, its layout is constructed using <a href="http://jigsaw.w3.org/css-validator/validator?uri=http://daringfireball.net/css/fireball_screen.css">valid CSS</a>, and its syndicated feed is <a href="http://feedvalidator.org/check?url=http%3A%2F%2Fdaringfireball.net%2Findex.xml">valid Atom</a>.</p>
- <p>If Daring Fireball looks goofy in your browser, you’re likely using a shitty browser that doesn’t support web standards. Internet Explorer, I’m looking in your direction. If you complain about this, I will laugh at you, because I do not care. If, however, you are using a modern, standards-compliant browser and have trouble viewing or reading Daring Fireball, please do let me know.</p> \ No newline at end of file
+<div class="article">
+
+ <p>Daring Fireball is written and produced by John Gruber.</p>
+ <p>
+ <a href="/graphics/author/addison-bw.jpg"> <img alt="Photograph of the author." src="/graphics/author/addison-bw-425.jpg" style="border: 0;"></img></a>
+ <br></br><em>Portrait by <a href="http://superbiate.com/inquiries/">George Del Barrio</a></em> </p>
+ <h2>Mac Apps</h2>
+ <ul><li><a href="http://www.barebones.com/products/bbedit/">BBEdit</a></li>
+ <li><a href="http://www.flyingmeat.com/acorn/">Acorn</a></li>
+ <li><a href="http://www.red-sweater.com/marsedit/">MarsEdit</a></li>
+ <li><a href="http://aged-and-distilled.com/napkin/">Napkin</a></li>
+ <li><a href="http://www.barebones.com/products/Yojimbo/">Yojimbo</a></li>
+ <li><a href="http://www.panic.com/transmit/">Transmit</a></li>
+ <li><a href="http://latenightsw.com/sd4/index.html">Script Debugger</a></li>
+ <li><a href="http://www.ambrosiasw.com/utilities/snapzprox/">Snapz Pro X</a></li>
+ <li><a href="http://nightly.webkit.org/">WebKit</a></li>
+ </ul><h2>iPhone Apps</h2>
+ <ul><li><a href="http://vesperapp.co/">Vesper</a></li>
+ </ul><h2>Server Software</h2>
+ <p>The Daring Fireball website is hosted by <a href="http://joyent.com/">Joyent</a>.</p>
+ <p>Articles and links are published through <a href="http://movabletype.org/">Movable Type</a>. In addition to my own SmartyPants and Markdown plug-ins, Daring Fireball uses several excellent Movable Type plug-ins, including Brad Choate’s <a href="http://bradchoate.com/weblog/2003/06/24/regular-expressions">MT-Regex</a> and <a href="http://bradchoate.com/weblog/2004/10/20/mtifempty">MT-IfEmpty</a>, and <a href="http://bumppo.net/projects/amputator/">Nat Irons’s Amputator</a>.</p>
+ <p>Stats are tracked using <a href="http://haveamint.com/">Mint</a>. Additional web nerdery, including the membership system, is fueled by <a href="http://perl.org/">Perl</a>, <a href="http://www.php.net/">PHP</a>, and <a href="http://www.mysql.com/">MySQL</a>.</p>
+ <h2>Web Standards</h2>
+ <p>Web standards are important, and Daring Fireball adheres to them. Specifically, Daring Fireball’s HTML markup should validate as either <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML 5</a> or XHTML 4.01 Transitional, its layout is constructed using <a href="http://jigsaw.w3.org/css-validator/validator?uri=http://daringfireball.net/css/fireball_screen.css">valid CSS</a>, and its syndicated feed is <a href="http://feedvalidator.org/check?url=http%3A%2F%2Fdaringfireball.net%2Findex.xml">valid Atom</a>.</p>
+ <p>If Daring Fireball looks goofy in your browser, you’re likely using a shitty browser that doesn’t support web standards. Internet Explorer, I’m looking in your direction. If you complain about this, I will laugh at you, because I do not care. If, however, you are using a modern, standards-compliant browser and have trouble viewing or reading Daring Fireball, please do let me know.</p>
+ </div> \ No newline at end of file