Commit 9a887f86 authored by webchick's avatar webchick

#698992 by Damien Tournoud: Small comment clarification to check_plain() in l().

parent 8b57f3bf
......@@ -2736,6 +2736,8 @@ function l($text, $path, array $options = array()) {
if ($use_theme) {
return theme('link', array('text' => $text, 'path' => $path, 'options' => $options));
}
// The result of url() is a plain-text URL. Because we are using it here
// in an HTML argument context, we need to encode it properly.
return '<a href="' . check_plain(url($path, $options)) . '"' . drupal_attributes($options['attributes']) . '>' . ($options['html'] ? $text : check_plain($text)) . '</a>';
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment