Skip to content

Commit

Permalink
Less work sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
GlazerMann authored Dec 28, 2024
1 parent 7fa4965 commit 0a82fc3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -2649,8 +2649,16 @@ public function add_if_new(string $param_name, string $value, string $api = ''):

case 'work':
case 'encyclopedia':
$value = html_entity_decode($value, ENT_COMPAT | ENT_HTML401, "UTF-8");
$value = html_entity_decode($value, ENT_COMPAT | ENT_HTML401, "UTF-8");
$value = html_entity_decode($value, ENT_COMPAT | ENT_HTML401, "UTF-8");
if (mb_substr($value, -1) === '.') {
$value = sanitize_string($value) . '.';
} else {
$value = sanitize_string($value);
}
if ($this->blank(WORK_ALIASES)) {
return $this->add($param_name, wikify_external_text($value));
return $this->add($param_name, $value);
}
return false;

Expand Down

0 comments on commit 0a82fc3

Please sign in to comment.