From cfc9eb079f4399db0e1be7070debbe848ec1f22f Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Tue, 11 Mar 2008 22:28:26 -0400 Subject: [PATCH] Now using encodeAttribute. --- markdown.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/markdown.php b/markdown.php index 781daf9..bf14c80 100644 --- a/markdown.php +++ b/markdown.php @@ -2523,14 +2523,12 @@ class MarkdownExtra_Parser extends Markdown_Parser { $attr = " rev=\"footnote\""; if ($this->fn_backlink_class != "") { $class = $this->fn_backlink_class; - $class = $this->encodeAmpsAndAngles($class); - $class = str_replace('"', '"', $class); + $class = $this->encodeAttribute($class); $attr .= " class=\"$class\""; } if ($this->fn_backlink_title != "") { $title = $this->fn_backlink_title; - $title = $this->encodeAmpsAndAngles($title); - $title = str_replace('"', '"', $title); + $title = $this->encodeAttribute($title); $attr .= " title=\"$title\""; } $num = 0; @@ -2579,14 +2577,12 @@ class MarkdownExtra_Parser extends Markdown_Parser { $attr = " rel=\"footnote\""; if ($this->fn_link_class != "") { $class = $this->fn_link_class; - $class = $this->encodeAmpsAndAngles($class); - $class = str_replace('"', '"', $class); + $class = $this->encodeAttribute($class); $attr .= " class=\"$class\""; } if ($this->fn_link_title != "") { $title = $this->fn_link_title; - $title = $this->encodeAmpsAndAngles($title); - $title = str_replace('"', '"', $title); + $title = $this->encodeAttribute($title); $attr .= " title=\"$title\""; } $attr = str_replace("%%", $num, $attr);