edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] [patch] TidyEscapeScripts
@ 2016-03-24  6:38 Kevin Carhart
  2016-03-24  7:34 ` Karl Dahlke
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Carhart @ 2016-03-24  6:38 UTC (permalink / raw)
  To: Edbrowse-dev

Thanks for the remarks about frames.  I'll revisit that shortly
but let's get tidy issue 348 out of our hair.  Geoff said that his
suggestion for how to implement this is what is shown in the following
patch.  It sets the new tidy option to 'no' by default in edbrowse,
meaning don't parse scripts by default, meaning do make the change by
default.  Whereas when you compile tidy, the new option is set to 
'yes' by default, meaning, leave things as they have been for 
continuity.  So the feature is there but latent until you make the
setting.

Thanks
Kevin

>From c4b58703036dd77db3ce14562ff89e10383b0664 Mon Sep 17 00:00:00 2001
From: Kevin Carhart <kevin@carhart.net>
Date: Wed, 23 Mar 2016 23:12:45 -0700
Subject: [PATCH] sets new tidy opt 'EscapeScripts' to 'no' by default

---
 src/html-tidy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/html-tidy.c b/src/html-tidy.c
index 7c086ad..d121c21 100644
--- a/src/html-tidy.c
+++ b/src/html-tidy.c
@@ -119,6 +119,10 @@ void html2nodes(const char *htmltext, bool startpage)
 		tidyOptSetInt(tdoc, TidyBodyOnly, yes);
 	tidySetReportFilter(tdoc, tidyErrorHandler);
 //    tidySetReportFilter(tdoc, tidyReportFilter);
+	
+	// the following tidyOptSetBool implements 
+	// a fix for https://github.com/htacg/tidy-html5/issues/348 
+	tidyOptSetBool( tdoc, TidyEscapeScripts, no );
 
 	tidySetCharEncoding(tdoc, (cons_utf8 ? "utf8" : "latin1"));
 
-- 
1.8.3.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Edbrowse-dev]  [patch] TidyEscapeScripts
  2016-03-24  6:38 [Edbrowse-dev] [patch] TidyEscapeScripts Kevin Carhart
@ 2016-03-24  7:34 ` Karl Dahlke
  0 siblings, 0 replies; 2+ messages in thread
From: Karl Dahlke @ 2016-03-24  7:34 UTC (permalink / raw)
  To: Edbrowse-dev

Pushed, plus another change to jsrt to verify that tidy 348 is indeed fixed.
We now respect
foo.innerHTML = "<A rhef=blah>click here</a>";
just like any other browser.
Hmm - don't know if the same fix handles </a in a style script.
Or the <textarea> almost script.
Well anyways it looks like a big step forward.
Thanks to the tidy team.

Karl Dahlke

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-24  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-24  6:38 [Edbrowse-dev] [patch] TidyEscapeScripts Kevin Carhart
2016-03-24  7:34 ` Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).