all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [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

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal