Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Package cloud #181

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "hypernova",
"name": "@shopify/hypernova",
"version": "2.5.0",
"description": "A service for server-side rendering your JavaScript views",
"publishConfig": {
"access": "restricted"
},
"main": "lib/index.js",
"scripts": {
"prepublish": "not-in-publish || safe-publish-latest && npm run build",
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const RIGHT = '-->';
const ENCODE = [
['&', '&'],
['>', '>'],
['<', '&lt;'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that I’m pretty sure this isnt needed, it just increases the HTML size for no benefit.

['/', '&#47;'],
];

const DATA_KEY = 'hypernova-key';
Expand Down
2 changes: 1 addition & 1 deletion test/escape-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('escaping', () => {
it('escapes', () => {
const html = serialize('foo', '', { foo: '</script>', bar: '&gt;' });

assert.include(html, '</script&gt;');
assert.include(html, '&lt;&#47;script&gt;');
assert.include(html, '&amp;gt;');
});

Expand Down