Permalink
Browse files

Now using encodeAttribute.

  • Loading branch information...
1 parent 3956073 commit cfc9eb079f4399db0e1be7070debbe848ec1f22f @michelf committed Mar 12, 2008
Showing with 4 additions and 8 deletions.
  1. +4 −8 markdown.php
View
@@ -2523,14 +2523,12 @@ function appendFootnotes($text) {
$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 @@ function _appendFootnotes_callback($matches) {
$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);

0 comments on commit cfc9eb0

Please sign in to comment.