Skip to content

Decode entities in htmlparser2#440

Merged
fb55 merged 2 commits into
masterfrom
decode_entities_htmlparser2
Apr 10, 2014
Merged

Decode entities in htmlparser2#440
fb55 merged 2 commits into
masterfrom
decode_entities_htmlparser2

Conversation

@fb55

@fb55 fb55 commented Apr 8, 2014

Copy link
Copy Markdown
Member

fixes #248

This changes how text nodes are stored in the DOM: They are now unescaped by default, which leads to a slight overhead when rendering.

fixes #248

This changes how text nodes are stored in the DOM: They are now
unescaped by default, which leads to a slight overhead when rendering.
@fb55

fb55 commented Apr 8, 2014

Copy link
Copy Markdown
Member Author

Also fixes #194.

@fb55

fb55 commented Apr 8, 2014

Copy link
Copy Markdown
Member Author

@matthewmueller Mind taking a look? (Also at #439.)

only used to ensure every call contained this setting
Comment thread test/render.js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are you intentionally mutating the provided options object here? If not, consider:

_.defaults({}, options || {}, defaultOpts);

Also, _.defaults treats null/undefined as an empty object, so the || {} is probably unnecessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

_.defaults treats null/undefined as an empty object

For arguments other than the first, that is.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Both methods are actually never called with an options object, so this is only to preserve the previous API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants