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

Do not remove anchors in safe_mode #284

Merged
merged 2 commits into from Jan 19, 2018
Merged

Do not remove anchors in safe_mode #284

merged 2 commits into from Jan 19, 2018

Conversation

tetafro
Copy link
Contributor

@tetafro tetafro commented Jan 14, 2018

This PR fixes the following:

>>> markdown('[text](#anchor)')
u'<p><a href="#anchor">text</a></p>\n'

>>> markdown('[text](#anchor)', safe_mode='escape')
u'<p><a href="#">text</a></p>\n'

In other words - internal anchors should not be considered unsafe.

Also I've added pygments tag to fenced_code_blocks_leading_lang_space test because it fails without pygments installed.

@nicholasserra
Copy link
Collaborator

Looks good to me, thanks!

@nicholasserra nicholasserra merged commit 3b39916 into trentm:master Jan 19, 2018
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.

None yet

2 participants