Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest upstream #81

Merged
merged 2 commits into from
Oct 17, 2018
Merged

Latest upstream #81

merged 2 commits into from
Oct 17, 2018

Conversation

kivikakk
Copy link
Collaborator

Pulls in github/cmark-gfm#123, defaulting to safe operation.

/cc @gjtorikian for your consideration. This change requires downstream users to use :UNSAFE to get the effect that :DEFAULT previously would.

Alternatively, we could insulate users of commonmarker from the cmark-gfm change by sending CMARK_OPT_UNSAFE to the library unless :SAFE was provided -- it depends on how much we'd be concerned about users updating and complaining, I think, but I do believe defaulting to non-XSSable output is the better option.

@gjtorikian
Copy link
Owner

I do believe defaulting to non-XSSable output is the better option.

I completely agree! Thanks, as always.

@jewilmeer
Copy link

Be careful with just making a minor release for these changes. This actually should be a major version bump, as it removes the SAFE option when rendering like this:

CommonMarker.render_html(content, %i[SAFE HARDBREAKS])

@jdickey
Copy link

jdickey commented Jan 4, 2019

Agreed with @jewilmeer. For a minor release, I think the "alternative" described by @kivikakk would be the sane (if not strictly :SAFE) way to go, possibly with a deprecation warning for :DEFAULT stating that its behaviour is going to be reversed in an imminent major release. Give that a few weeks to ripple through the downstream-dependency web, then push out a major version with the default-:SAFE change (and no deprecation warning).

@kivikakk
Copy link
Collaborator Author

kivikakk commented Jan 6, 2019

This actually should be a major version bump, as it removes the SAFE option when rendering like this

Normally I would agree, but with CommonMarker still being pre-1.0 the API is essentially unfrozen. (per SemVer: "Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.")

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

Successfully merging this pull request may close these issues.

4 participants