Navigation Menu

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

Package cloud #181

wants to merge 4 commits into from

Conversation

richter-alex
Copy link

Setting up for private hosting on package cloud

@richter-alex richter-alex deleted the package-cloud branch March 24, 2020 14:35
@richter-alex richter-alex restored the package-cloud branch March 24, 2020 14:38
@richter-alex richter-alex deleted the package-cloud branch March 24, 2020 14:49
@ljharb
Copy link
Collaborator

ljharb commented Mar 24, 2020

Is there a reason you need to fork this?

@ljharb ljharb added the invalid label Mar 24, 2020
@@ -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.

@richter-alex
Copy link
Author

richter-alex commented Mar 24, 2020

Hey @ljharb!

We were under the impression that this project and hypernova-ruby weren't actively maintained due to the reduced contributions/interactions lately.

Let me give you some context:

We noticed a bug awhile ago where unescaped HTML characters were causing a JSON.parse error, breaking the JS on some of our views. The original attempt to rectify this was here: airbnb/hypernova-ruby#22

The issue is that certain browsers will take a prop like </script and try to complete the tag as described in the above pull request.

I've been looking into this one for the past little while and I guess that hypernova-ruby performs that escaping through the BlankRenderer when the hypernova server is unavailable right? So a more complete solution would be to implement more thorough escaping on hypernova and its client libraries to cover all scenarios.

tl;dr we feel we should be escaping these other characters for safety and to protect against the current breakages we're experiencing.

Looking again at the original PR I'm inclined to agree that JSON escaping would be more appropriate, but anxious to hear what you think.

@ljharb
Copy link
Collaborator

ljharb commented Mar 24, 2020

It seems like it would be a trivial change to just add escaping of < alone - would that address the use case?

If so, it'd be great to reopen this PR and repurpose it to achieve that, and we can do the same process on hypernova-ruby.

@richter-alex
Copy link
Author

I agree, that should be trivial and would resolve the issue on our end. How do you feel about switching to JSON escaping instead as part of the implementation as outlined in airbnb/hypernova-ruby#22?

@ljharb
Copy link
Collaborator

ljharb commented Mar 24, 2020

I’d have to see what that involves.

For now, I’m going to move forward with #167

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants