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

Escape Not Working #442

Closed
ghost opened this issue Oct 13, 2016 · 2 comments
Closed

Escape Not Working #442

ghost opened this issue Oct 13, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2016

setMarkUpEscaped is not working.

Example of code
$parsedown = new Parsedown(); $parsedown->setMarkupEscaped(true)->text($PostMBody);

PostMBody is just a textarea, formatted like so:
$PostMBody = $db->real_escape_string(strip_tags(stripslashes($_POST["PostBody"]))); // Body of the post

The page just goes blank and responds with a 500 error.

I'm including Parsedown like so (latest version)
include $_SERVER["DOCUMENT_ROOT"]."/_INCLUDES/MarkdownParser/markdown.php"; // Parser for markdown to DB (the latest Parsedown.php file) - the same error happens when I try the break line function.

What am I doing wrong?!

@wkhayrattee
Copy link

wkhayrattee commented Oct 25, 2016

Hey you are using the Parsedown class and is including MarkdownParser? :) I think that's your culprit there ;)
I think you got the wrong library there and hence your server is not finding that class and faulting...
(cross-check please)

can you do:

  1. print_r($_SERVER["DOCUMENT_ROOT"]."/_INCLUDES/MarkdownParser/markdown.php");
    and make sure the file is indeed found at the printed path?

  2. Can you confirm that you get the 500 error when $parsedown->setMarkupEscaped() is call and not even before that?

Out of curiosity, why are you including the file and not using composer autoloader?

@aidantwoods
Copy link
Collaborator

Is this issue still occurring @mazux?

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

No branches or pull requests

2 participants