scinfu / SwiftSoup

SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)
https://scinfu.github.io/SwiftSoup/
MIT License
4.52k stars 345 forks source link

How an I avoid SwiftSoup from encoding single quotes in a double quote attribute value? #207

Open ahwulf opened 2 years ago

ahwulf commented 2 years ago

I have

<div class="row" data-masonry="{'percentPosition': true, 'itemSelector':'.grid-item', 'columnWidth':'.grid-sizer' }">

if I extract this and then insert into another document, then do html() I get

<div class="row" data-masonry="{&quot;percentPosition&quot;: true, &quot;itemSelector&quot;:&quot;.grid-item&quot;, &quot;columnWidth&quot;:&quot;.grid-sizer&quot; }">

Is there a way to have it not do this?