Fix MCP occurrence apostrophe escaping
This commit is contained in:
1 parent
85834a0498
commit
8733ce6148
2 files changed
+31
-4
No files matched your search
@@ -66,7 +66,7 @@ function market_management_sanitize_multiline_html(?string $value): ?string
|
||||
|
||||
$tokens = preg_split('/(<\/?a\b[^>]*>|<br\s*\/?>|<\/?strong\s*>)/iu', $value, -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
if ($tokens === false) {
|
||||
return htmlspecialchars($value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||
return htmlspecialchars($value, ENT_NOQUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||
}
|
||||
|
||||
$result = '';
|
||||
@@ -89,7 +89,7 @@ function market_management_sanitize_multiline_html(?string $value): ?string
|
||||
$result .= '</a>';
|
||||
$anchorOpen = false;
|
||||
} else {
|
||||
$result .= htmlspecialchars($token, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||
$result .= htmlspecialchars($token, ENT_NOQUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ function market_management_sanitize_multiline_html(?string $value): ?string
|
||||
$anchorOpen = true;
|
||||
continue;
|
||||
}
|
||||
$result .= htmlspecialchars($token, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||
$result .= htmlspecialchars($token, ENT_NOQUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||
}
|
||||
if ($anchorOpen) {
|
||||
$result .= '</a>';
|
||||
@@ -1106,7 +1106,6 @@ function market_management_get_occurrence(PDO $pdo, int $occurrenceId, bool $inc
|
||||
break;
|
||||
}
|
||||
}
|
||||
market_management_sanitize_occurrence_payload($occurrence);
|
||||
$costSummary = $pdo->prepare(
|
||||
'SELECT COALESCE(SUM(gross_amount), 0) AS gross_amount,
|
||||
COALESCE(SUM(net_amount), 0) AS net_amount,
|
||||
|
||||
Reference in new issue
Block a user