Skip to content
Browse files

Added preg_quote in handling of code span tokens in handleSpanToken t…

…o satisfy the security paranoid.
  • Loading branch information...
1 parent 1e69a09 commit ef6e25229ded9936d0c47186b037a9d52f14e55b @michelf committed Jun 5, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 markdown.php
View
2 markdown.php
@@ -1409,7 +1409,7 @@ function handleSpanToken($token, &$str) {
return $this->hashPart("&#". ord($token{1}). ";");
case "`":
# Search for end marker in remaining text.
- if (preg_match('/^(.*?[^`])'.$token.'(?!`)(.*)$/sm',
+ if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm',
$str, $matches))
{
$str = $matches[2];

0 comments on commit ef6e252

Please sign in to comment.
Something went wrong with that request. Please try again.