Skip to content

Instantly share code, notes, and snippets.

@jjarava
Last active August 29, 2015 14:12
Show Gist options
  • Save jjarava/00e7627fc16b84d14d08 to your computer and use it in GitHub Desktop.
Save jjarava/00e7627fc16b84d14d08 to your computer and use it in GitHub Desktop.
Bug Report - Marky Choking in & characters in HTML fragments

Bug Report - Marky Choking in & characters in HTML fragments

Summary

When Marky is fed an HTML fragment that includes the & (ampersand) char, it will choke/stop processing.

Bug Details

While testing my @workflowhq workflow Emulate Drafts Web Capture Keeping Links, I noticed that if the clipboard has an "&" char, the MMD output I get is truncated there. Further testing validated that if the html fragment that is fed to Marky via the "HTML" option (http://heckyesmarkdown.com/go/?html={fragment}&read=1&md=1) contains an ampersand processing stops there.

Test Case

I've built a test case to show the problem.

HTML Fragment:

<html>
<body>
Testing Ampersand &amp; Marky behavior with HTML fragments
</body>
</html>

Resulting Marky URL: http://heckyesmarkdown.com/go/?html=%3Chtml%3E%0A%3Cbody%3E%0ATesting%20Ampersand%20&%20Marky%20behavior%20with%20HTML%20fragments%0A%3C/body%3E%0A%3C/html%3E&read=1&md=1

Test case Workflow: For ease of testing I've built a demo Workflow (https://workflow.is/workflows/2a381048a30049cf8bd2b5554ccffe5d) that takes the HTML code in a Text action, runs it through Marky and creates a Drafts4 note with the input, URL and result.

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