fix crash when loading html

This commit is contained in:
Bennet Bleßmann
2025-07-07 22:39:47 -07:00
committed by Mark Thom
parent cbdd0fbf15
commit 725def07cd
4 changed files with 95 additions and 19 deletions
+11
View File
@@ -0,0 +1,11 @@
:- use_module(library(sgml)).
test :-
load_html("<!DOCTYPE html><html><head><title>Hello!</title></head></html>", Es, []),
write(Es),
load_html("<!DOCTYPE html><html><head><title>Hello!</title><!-- comment --></head></html>", Es2, []),
write(Es2),
load_html("<!", Es3, []),
write(Es3).
:- initialization(test).