script tags stripped out of code blocks
I am editing my markdown in TextMate and it is updating in Marked as expected. All was well until I tried to add a snippet of code to my file. I added a set of html head tags with a link file for css and a script file. This code is indented and shows up in Marked as a code block as expected, except the script tags have been stripped out. I confirmed that they had been removed by checking the html view in marked. I pushed the file to tumblr as a draft and previewed it and it is working there, so I don't think the problem is in my file.
I got marked primarily to edit posts for my blog, which will contain quite a bit of code, so this is a big problem for me. I'd be happy to take steps to fix this on my end, or at least use a work-around until this can be fixed.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 05 Dec, 2011 07:40 PM
This is fixed for the next version. I strip out script tags to avoid conflicts in the preview, but I got a little trigger happy when it came to code blocks. Next release is much more well behaved. In the meantime, you can probably bypass the regex that matches script tags just by adding a space in `< script` or similar. Let me know if that works for you.
-Brett
2 Posted by Andrew on 05 Dec, 2011 07:47 PM
Adding a space in the opening tag did the trick and I'm glad to hear a fix is already on the way. Thanks for the quick response!
Brett closed this discussion on 07 Dec, 2011 06:43 PM.