Issue 6316: Do not double encode / Avoid notice

This commit is contained in:
Michael 2018-12-25 12:12:59 +00:00
parent a8cbeab8a0
commit ccb9be8f28
2 changed files with 2 additions and 2 deletions

View file

@ -511,7 +511,7 @@ class Contact extends BaseModule
$relation_text = ''; $relation_text = '';
} }
$relation_text = sprintf($relation_text, htmlentities($contact['name'])); $relation_text = sprintf($relation_text, $contact['name']);
$url = Model\Contact::magicLink($contact['url']); $url = Model\Contact::magicLink($contact['url']);
if (strpos($url, 'redir/') === 0) { if (strpos($url, 'redir/') === 0) {

View file

@ -1378,7 +1378,7 @@ class PortableContact
$info = defaults($data, 'info', ''); $info = defaults($data, 'info', '');
$register_policy = defaults($data, 'register_policy', REGISTER_CLOSED); $register_policy = defaults($data, 'register_policy', REGISTER_CLOSED);
if (in_array($register_policy, ['REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN'])) { if (in_array($register_policy, ['REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN'])) {
$register_policy = constant($data['register_policy']); $register_policy = constant($register_policy);
} else { } else {
Logger::log("Register policy '$register_policy' from $server_url is invalid."); Logger::log("Register policy '$register_policy' from $server_url is invalid.");
$register_policy = REGISTER_CLOSED; // set a default value $register_policy = REGISTER_CLOSED; // set a default value