* [pdm-devel] [PATCH yew-comp] sanitize html: don't fail on html comments
@ 2025-12-02 10:34 Dominik Csapak
2025-12-02 10:52 ` [pdm-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-12-02 10:34 UTC (permalink / raw)
To: pdm-devel
html comments are type '8' [0], so instead of failing when encountering
them, just ignore them.
0: https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/sanitize_html.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/sanitize_html.rs b/src/sanitize_html.rs
index 35277c9..ff058c7 100644
--- a/src/sanitize_html.rs
+++ b/src/sanitize_html.rs
@@ -27,6 +27,7 @@ fn sanitize_html_element(node: &web_sys::Node, base_url: &str) -> Result<(), Err
let node_type = node.node_type();
match node_type {
+ 8 => Ok(()), /* HTML Comment Node */
3 => Ok(()), /* Text Node */
1 => {
/* Element Node */
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pdm-devel] applied: [PATCH yew-comp] sanitize html: don't fail on html comments
2025-12-02 10:34 [pdm-devel] [PATCH yew-comp] sanitize html: don't fail on html comments Dominik Csapak
@ 2025-12-02 10:52 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-12-02 10:52 UTC (permalink / raw)
To: pdm-devel, Dominik Csapak
On Tue, 02 Dec 2025 11:34:40 +0100, Dominik Csapak wrote:
> html comments are type '8' [0], so instead of failing when encountering
> them, just ignore them.
>
> 0: https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
>
>
Applied, thanks!
[1/1] sanitize html: don't fail on html comments
commit: 0f261f9b4b01fe749636fdeb80175d1059238f50
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-02 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-02 10:34 [pdm-devel] [PATCH yew-comp] sanitize html: don't fail on html comments Dominik Csapak
2025-12-02 10:52 ` [pdm-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.