Open einkoro opened 10 years ago
Looks like GitHub is eating the markdown in the code ticks. If you click the image button in the editor and enter http://example.org/test.png you will get the content I was entering as a test.
I'd rather keep any globals outside wpmarkdown_html_to_markdown()
- particularly since it can be used in a context when bbPress isn't even installed.
Is there a way we can ensure wpmarkdown_html_to_markdown()
isn't even called in case of errors?
Should be able to move it up to the functions which are calling it. Probably should be using is_bbpress or checking if the plugin is loaded as well before checking for the error. I need to setup a new staging environment before testing it though as the website has been pushed live now.
On Jun 5, 2014, at 4:23, Stephen Harris notifications@github.com wrote:
I'd rather keep any globals outside wpmarkdown_html_to_markdown() - particularly since it can be used in a context when bbPress isn't even installed.
Is there a way we can ensure wpmarkdown_html_to_markdown() isn't even called in case of errors?
— Reply to this email directly or view it on GitHub.
For example, if you try and post a new topic and leave the title blank with the following content:
The post will be rejected due to not having a title and then the content in the textarea becomes:
It looks like this happens due to
wpmarkdown_html_to_markdown()
being called and then$md->parseString( $html )
being run on the markdown.Adding the following check for errors fixes it for me: