Skip to content

Commit

Permalink
Revert "Reverted chages to COM_createLink()"
Browse files Browse the repository at this point in the history
This reverts commit cc9addf.
  • Loading branch information
mystralkk committed Nov 30, 2017
1 parent cc9addf commit 64bd55f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion public_html/admin/plugins.php
Expand Up @@ -943,7 +943,6 @@ function continue_upgrade($plugin, $pi_version, $code_version)
* @param string $message (optional) message to display
* @param string $token an optional csrf token
* @return string HTML for the plugin screen
* @throws Exception
*/
function plugin_main($message = '', $token = '')
{
Expand Down
6 changes: 5 additions & 1 deletion public_html/lib-common.php
Expand Up @@ -7202,7 +7202,11 @@ function COM_createLink($content, $url, $attr = array())

$attributes = '';
foreach ($attr as $key => $value) {
$attributes .= sprintf(' %s="%s"', $key, $value, ENT_QUOTES, $charset);
$attributes .= sprintf(
' %s="%s"',
htmlspecialchars($key, ENT_QUOTES, $charset),
htmlspecialchars($value, ENT_QUOTES, $charset)
);
}

$retval = sprintf('<a href="%s"%s>%s</a>', $url, $attributes, $content);
Expand Down

0 comments on commit 64bd55f

Please sign in to comment.