Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Fix stringify() -> stringifyAsync() #262

Merged
merged 2 commits into from
Jun 23, 2020
Merged

Fix stringify() -> stringifyAsync() #262

merged 2 commits into from
Jun 23, 2020

Conversation

lexidor
Copy link
Contributor

@lexidor lexidor commented Jun 18, 2020

The old name for this method was ->stringify().
These stragglers did not have an __Override on ->stringify(), so the typechecker could not warn us about this.

Fixes:
<br/> now renders as <br> again (not <br></br>).
<style>&</style> now renders as <style>&</style> again, (not <style>&amp;</style>).

@lexidor
Copy link
Contributor Author

lexidor commented Jun 18, 2020

I'd have expected toHTMLStringAsync() to take precedence over toStringAsync().
If something is both a node and an UnsafeRenderable, we prefer the node's toStringAsync() in
Node::renderChildAsync() is why <style> used the default "safe" renderer which escapes the contents.
In fact, UnsafeRenderable on style is ignored and not used while rendering.

Edit: updated the link to point to the state at the latest commit. Previous link pointed to master, which changed since the link was made, so the highlighted lines were wrong.

@fredemmott fredemmott merged commit 097af68 into hhvm:master Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants