From a9847865d901e3f0f633b7787d9d85c93aa386d1 Mon Sep 17 00:00:00 2001 From: "Eric J. Bowersox" Date: Wed, 20 Jun 2001 04:08:34 +0000 Subject: [PATCH] added code to put in the META tag that defeats Microsoft IE Smart Tags --- etc/render-config.xml | 8 ++++++++ .../silverwrist/venice/servlets/format/RenderConfig.java | 9 +++++++++ .../silverwrist/venice/servlets/format/RenderData.java | 6 ++++++ web/format/base.jsp | 3 +++ web/static/about-venice.html | 1 + web/static/html-reference.html | 1 + 6 files changed, 28 insertions(+) diff --git a/etc/render-config.xml b/etc/render-config.xml index 2c2fb03..9c2c364 100644 --- a/etc/render-config.xml +++ b/etc/render-config.xml @@ -30,6 +30,14 @@ allows it. --> + + + Arial, Helvetica diff --git a/src/com/silverwrist/venice/servlets/format/RenderConfig.java b/src/com/silverwrist/venice/servlets/format/RenderConfig.java index b634a3a..a638959 100644 --- a/src/com/silverwrist/venice/servlets/format/RenderConfig.java +++ b/src/com/silverwrist/venice/servlets/format/RenderConfig.java @@ -54,6 +54,7 @@ public class RenderConfig private String site_title; private boolean want_comments; private boolean allow_gzip; + private boolean no_smart_tags; private String font_face; private String image_url; private String static_url; @@ -104,10 +105,12 @@ public class RenderConfig DOMElementHelper render_sect_h = new DOMElementHelper(render_sect); want_comments = render_sect_h.hasChildElement("html-comments"); allow_gzip = render_sect_h.hasChildElement("gzip-output"); + no_smart_tags = !(render_sect_h.hasChildElement("ms-copyright-violations")); if (logger.isDebugEnabled()) { // log the read values logger.debug("Use HTML comments: " + String.valueOf(want_comments)); logger.debug("Use GZIP encoding: " + String.valueOf(allow_gzip)); + logger.debug("Disable IE Smart Tags: " + String.valueOf(no_smart_tags)); } // end if @@ -325,6 +328,12 @@ public class RenderConfig } // end isGZIPAllowed + boolean noSmartTags() + { + return no_smart_tags; + + } // end noSmartTags + String getFullImagePath(String name) { StringBuffer buf = new StringBuffer(); diff --git a/src/com/silverwrist/venice/servlets/format/RenderData.java b/src/com/silverwrist/venice/servlets/format/RenderData.java index 63bd1fd..cafd1a4 100644 --- a/src/com/silverwrist/venice/servlets/format/RenderData.java +++ b/src/com/silverwrist/venice/servlets/format/RenderData.java @@ -135,6 +135,12 @@ public class RenderData } // end canGZIPEncode + boolean noSmartTags() + { + return rconf.noSmartTags(); + + } // end noSmartTags + public String getSiteImageTag(int hspace, int vspace) { return rconf.getSiteImageTag(hspace,vspace); diff --git a/web/format/base.jsp b/web/format/base.jsp index dc30162..68e7dcc 100644 --- a/web/format/base.jsp +++ b/web/format/base.jsp @@ -35,6 +35,9 @@ <%= rdat.getTitleTag(basedat.getTitle(rdat)) %> <%= rdat.getStdBaseFontTag(3) %> + <% if (rdat.noSmartTags()) { %> + + <% } // end if %> diff --git a/web/static/about-venice.html b/web/static/about-venice.html index 4c5f31f..2a48c4f 100644 --- a/web/static/about-venice.html +++ b/web/static/about-venice.html @@ -2,6 +2,7 @@ About Venice + diff --git a/web/static/html-reference.html b/web/static/html-reference.html index 15c0123..225fc8a 100644 --- a/web/static/html-reference.html +++ b/web/static/html-reference.html @@ -18,6 +18,7 @@ --> Venice HTML Tags Reference +