Skip to content

Commit

Permalink
Merge pull request #268 from sveltejs/gh-267
Browse files Browse the repository at this point in the history
fix apostrophe entity
  • Loading branch information
Rich-Harris authored Jan 25, 2017
2 parents 6cde8ff + 6d8543f commit 4cad216
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/generators/server-side-rendering/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function ssr ( parsed, source, options, names ) {
var escaped = {
'"': '"',
"'": '&39;',
"'": ''',
'&': '&',
'<': '&lt;',
'>': '&gt;'
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
&lt;p&gt;this should be &lt;em&gt;escaped&lt;/em&gt; &amp; so should &39;this&39;&lt;/p&gt;
&lt;p&gt;this should be &lt;em&gt;escaped&lt;/em&gt; &amp; so should &#39;this&#39;&lt;/p&gt;
Original file line number Diff line number Diff line change
@@ -1 +1 @@
&lt;p&gt;this should be &lt;em&gt;escaped&lt;/em&gt; &amp; so should &39;this&39;&lt;/p&gt;
&lt;p&gt;this should be &lt;em&gt;escaped&lt;/em&gt; &amp; so should &#39;this&#39;&lt;/p&gt;
1 change: 1 addition & 0 deletions test/server-side-rendering/entities/_actual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it&#39;s working
1 change: 1 addition & 0 deletions test/server-side-rendering/entities/_expected.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it's working
3 changes: 3 additions & 0 deletions test/server-side-rendering/entities/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"foo": "it's working"
}
1 change: 1 addition & 0 deletions test/server-side-rendering/entities/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{foo}}

0 comments on commit 4cad216

Please sign in to comment.