Refs #209 - Increase score for elements containing large amount of text.

pull/212/head
Nicolas Perriault 9 years ago
parent 8510106638
commit 2c5ba594dd

@ -110,7 +110,7 @@ Readability.prototype = {
unlikelyCandidates: /banner|combx|comment|community|disqus|extra|foot|header|menu|related|remark|rss|share|shoutbox|sidebar|skyscraper|sponsor|ad-break|agegate|pagination|pager|popup/i,
okMaybeItsACandidate: /and|article|body|column|main|shadow/i,
positive: /article|body|content|entry|hentry|main|page|pagination|post|text|blog|story/i,
negative: /hidden|banner|combx|comment|com-|contact|foot|footer|footnote|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,
negative: /hidden|banner|combx|comment|com-|contact|control-?bar|foot|footer|footnote|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,
extraneous: /print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,
byline: /byline|author|dateline|writtenby/i,
replaceFonts: /<(\/?)font[^>]*>/gi,
@ -722,6 +722,10 @@ Readability.prototype = {
// For every 100 characters in this paragraph, add another point. Up to 3 points.
contentScore += Math.min(Math.floor(innerText.length / 100), 3);
if (elementToScore.tagName !== "section" && innerText.length > 300) {
contentScore *= 1.5;
}
// Initialize and score ancestors.
this._forEachNode(ancestors, function(ancestor, level) {
if (!ancestor.tagName)

@ -1,15 +1,18 @@
<div id="readability-page-1" class="page">
<div itemprop="articleBody" class="article-content clearfix">
<figure class="intro-image image center full-width"> <img src="http://cdn.arstechnica.net/wp-content/uploads/2015/04/server-crash-640x426.jpg" width="640" height="331">
<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 formats 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>
<article itemscope="" itemtype="http://schema.org/NewsArticle" class="standalone">
<header> </header>
<section id="article-guts">
<div itemprop="articleBody" class="article-content clearfix">
<figure class="intro-image image center full-width"> <img src="http://cdn.arstechnica.net/wp-content/uploads/2015/04/server-crash-640x426.jpg" width="640" height="331">
<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 formats 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>
<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>
@ -35,14 +38,24 @@
<span class="p">]</span>
<span class="p">...</span>
<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. Thats a total of <code>10^5 * 300 = 30,000,000</code> lists.</p>
<p>And this isnt 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>
<p>When the server will decompress our data, itll have 27 megs in a buffer somewhere in memory, but that isnt the bit thatll kill it. When it attempts to parse it into NBT, itll create java representations of the objects meaning suddenly, the sever is having to create several million java objects including ArrayLists. This runs the server out of memory and causes tremendous CPU load.</p>
<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 isnt 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>
<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. Thats a total of <code>10^5 * 300 = 30,000,000</code> lists.</p>
<p>And this isnt 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>
<p>When the server will decompress our data, itll have 27 megs in a buffer somewhere in memory, but that isnt the bit thatll kill it. When it attempts to parse it into NBT, itll create java representations of the objects meaning suddenly, the sever is having to create several million java objects including ArrayLists. This runs the server out of memory and causes tremendous CPU load.</p>
<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 isnt 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>
<p><a href="http://arstechnica.com/security/2015/04/16/just-released-minecraft-exploit-makes-it-easy-to-crash-game-servers/">Expand full story</a></p>
</section>
<div id="article-footer-wrap">
<aside class="thin-divide-bottom"> </aside>
<section class="article-author clearfix-redux">
<a href="http://fakehost/author/dan-goodin"><img width="47" height="47" src="http://cdn.arstechnica.net/wp-content/uploads/authors/Dan-Goodin-sq.jpg"></a>
<p><a href="http://fakehost/author/dan-goodin" class="author-name">Dan Goodin</a> / Dan is the Security Editor at Ars Technica, which he joined in 2012 after working for The Register, the Associated Press, Bloomberg News, and other publications.</p>
</section>
</div>
</article>
</div>

@ -0,0 +1,6 @@
{
"title": "Nob Hill one-bedroom sells for $2.3 million",
"byline": "By Emily Landes",
"excerpt": "In early March, we told you about a one-bedroom in the prestigious Comstock in Nob Hill, which came to market at $2.495 million, making it the most expensive one-bedroom on the market at the time. The northwest facing unit—with amazing panoramic views of Twin Peaks, the Golden Gate Bridge, the",
"readerable": true
}

@ -0,0 +1,292 @@
<div id="readability-page-1" class="page">
<div class="entry">
<div class="gallery clearfix">
<div class="galleria asset_gallery" id="galleria_31011101">
<div id="hst-resgallery-31011101" class="hst-resgallery-container clearfix"><span gallery_title="1333 Jones St. #806" gallery_id="31011" class="gallery-metadata"></span>
<div class="control-panel"><span data="" id="gallerySection"></span>
<div class="control-panel-inner">
<div class="caption ">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">1</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The one-bedroom just came to market at $2.495 million</p>
<div class="caption_480">
<p> The one-bedroom just came to market at $2.495 million </p>
</div>
</div>
<p class="MsoNormal">The one-bedroom just came to market at $2.495 million</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">2</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Before the massive renovation, the living area still had great views, but was dated.</p>
<div class="caption_480">
<p> Before the massive renovation, the living area still had great views, but was dated. </p>
</div>
</div>
<p class="MsoNormal">Before the massive renovation, the living area still had great views,...but was dated.</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">3</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Beautiful views from the floor-to-ceiling windows.</p>
<div class="caption_480">
<p> Beautiful views from the floor-to-ceiling windows. </p>
</div>
</div>
<p class="MsoNormal">Beautiful views from the floor-to-ceiling windows.</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">4</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The open concept living room</p>
<div class="caption_480">
<p> The open concept living room </p>
</div>
</div>
<p class="MsoNormal">The open concept living room</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">5</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The dining area</p>
</div>
<p class="MsoNormal">The dining area</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">6</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The open entertaining space</p>
<div class="caption_480">
<p> The open entertaining space </p>
</div>
</div>
<p class="MsoNormal">The open entertaining space</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">7</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The dining area before</p>
</div>
<p class="MsoNormal">The dining area before</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">8</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The den</p>
</div>
<p class="MsoNormal">The den</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">9</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Another view of the den</p>
</div>
<p class="MsoNormal">Another view of the den</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">10</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The kitchen</p>
</div>
<p class="MsoNormal">The kitchen</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">11</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The kitchen</p>
</div>
<p class="MsoNormal">The kitchen</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">12</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Custom cabinets and granite counters</p>
<div class="caption_480">
<p> Custom cabinets and granite counters </p>
</div>
</div>
<p class="MsoNormal">Custom cabinets and granite counters</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">13</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Another shot of the kitchen</p>
<div class="caption_480">
<p> Another shot of the kitchen </p>
</div>
</div>
<p class="MsoNormal">Another shot of the kitchen</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">14</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The old, enclosed kitchen</p>
<div class="caption_480">
<p> The old, enclosed kitchen </p>
</div>
</div>
<p class="MsoNormal">The old, enclosed kitchen</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">15</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Views from the kitchen</p>
</div>
<p class="MsoNormal">Views from the kitchen</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">16</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Built-in office nook</p>
</div>
<p class="MsoNormal">Built-in office nook</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">17</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The only bedroom also takes advantage of the views. </p>
<div class="caption_480">
<p> The only bedroom also takes advantage of the views. </p>
</div>
</div>
<p class="MsoNormal">The only bedroom also takes advantage of the views. </p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">18</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Another shot of the bedroom</p>
<div class="caption_480">
<p> Another shot of the bedroom </p>
</div>
</div>
<p class="MsoNormal">Another shot of the bedroom</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">19</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The bedroom before</p>
</div>
<p class="MsoNormal">The bedroom before</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">20</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Master closet</p>
</div>
<p class="MsoNormal">Master closet</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">21</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Master bath</p>
</div>
<p class="MsoNormal">Master bath</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">22</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Another shot of the master bath</p>
<div class="caption_480">
<p> Another shot of the master bath </p>
</div>
</div>
<p class="MsoNormal">Another shot of the master bath</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">23</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Soaking tub</p>
</div>
<p class="MsoNormal">Soaking tub</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">24</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Entry</p>
</div>
<p class="MsoNormal">Entry</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">25</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Standing on the balcony</p>
</div>
<p class="MsoNormal">Standing on the balcony</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">26</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Views from the northwest facing condo</p>
<div class="caption_480">
<p> Views from the northwest facing condo </p>
</div>
</div>
<p class="MsoNormal">Views from the northwest facing condo</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">27</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">More views</p>
</div>
<p class="MsoNormal">More views</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">28</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Golden Gate Bridge views</p>
</div>
<p class="MsoNormal">Golden Gate Bridge views</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">29</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">From inside the condo</p>
</div>
<p class="MsoNormal">From inside the condo</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">30</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">This corner window before</p>
<div class="caption_480">
<p> This corner window before </p>
</div>
</div>
<p class="MsoNormal">This corner window before</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">31</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The Comstock</p>
</div>
<p class="MsoNormal">The Comstock</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">32</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">The lobby</p>
</div>
<p class="MsoNormal">The lobby</p>
<div class="caption staged">
<div class="slide-count">
<p class="nav-stats"> <span class="label">Image </span> <span class="item-count-current">33</span> <span> of </span><span class="item-count-total">33</span> <span class="gallery-title-divider">|</span><span class="main-gallery-title">1333 Jones St. #806</span> </p>
</div><span class="credit">MLS </span>
<p class="MsoNormal">Another view of the lobby</p>
<div class="caption_480">
<p> Another view of the lobby </p>
</div>
</div>
<p class="MsoNormal">Another view of the lobby</p>
</div>
</div>
</div>
</div>
</div>
<p>In early March, we told you about <a href="http://blog.sfgate.com/ontheblock/2015/03/05/2-495-million-for-s-f-s-most-expensive-one-bedroom/">a one-bedroom in the prestigious Comstock </a>in Nob Hill, which came to market at $2.495 million, making it the most expensive one-bedroom on the market at the time. The northwest facing unit—with amazing panoramic views of Twin Peaks, the Golden Gate Bridge, the North Bay, Alcatraz and Coit Tower in almost every room—has now sold for $2.3 million, or 8% under the asking price.</p>
<p>At just over 1,800 square feet, the sale works out to about $1,250 a square foot for the completely gutted and remodeled unit. That price is also about $700K higher than when the unit last sold at the end of 2006. Of course, it was also in a very different state at the time, with old carpeting; a closed-off, very outdated kitchen; and two bedrooms. (<strong>Before and afters are in the gallery above.</strong>)</p>
<p>Almost all the walls came down during the remodel and the carpeting was changed out for hardwoods, not to mention the addition of a completely new open concept kitchen and modern bathrooms. Also, the second bedroom was changed into a den/office with a glass wall separating it from the rest of the large entertaining space. Even the windows were updated to take better advantage of the unbelievable views.</p>
<p>By the way, if youre looking for the same great views with a (slightly) smaller price tag, <a href="http://www.comstock1402.com">a 1,200-square-foot one-bedroom</a> just came to market in the same building. Youll get less indoor space but what appears to be a larger balcony to take in those incredible San Francisco sights, all for the bargain price of $1.75 million.</p>
<p><em>Emily Landes is a writer and editor who is obsessed with all things real estate.</em></p>
</div>
</div>

File diff suppressed because one or more lines are too long

@ -18,7 +18,7 @@ function reformatError(err) {
function runTestsWithItems(label, beforeFn, expectedContent, expectedMetadata) {
describe(label, function() {
this.timeout(5000);
this.timeout(10000);
var result;

Loading…
Cancel
Save