edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] [patch] TidyEscapeScripts
Date: Wed, 23 Mar 2016 23:38:20 -0700	[thread overview]
Message-ID: <20160223233820.kevin@carhart.net > (raw)

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



             reply	other threads:[~2016-03-24  6:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  6:38 Kevin Carhart [this message]
2016-03-24  7:34 ` Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20160223233820.kevin@carhart.net ' \
    --to=kevin@carhart.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).