added code to put in the META tag that defeats Microsoft IE Smart Tags

This commit is contained in:
Eric J. Bowersox 2001-06-20 04:08:34 +00:00
parent 69e62acbb9
commit a9847865d9
6 changed files with 28 additions and 0 deletions

View File

@ -30,6 +30,14 @@
allows it. -->
<!-- <gzip-output/> -->
<!-- If this is specified, the site will allow Microsoft Internet Explorer 6.0+ Smart
Tags to be inserted into site text. This is considered rude by many, and is quite
possibly a copyright violation by Microsoft (changing the site's text as viewed through
their browser, without consent of either the author or the end user). The default setting
inserts a META tag into the page which *should* prevent this (but may not, if MS provides
a setting to override site author preferences, which would be despicable). -->
<!-- <ms-copyright-violations/> -->
<!-- Specifies the default <FONT FACE=""> to use for all text. -->
<font>Arial, Helvetica</font>

View File

@ -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();

View File

@ -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);

View File

@ -35,6 +35,9 @@
<HEAD>
<%= rdat.getTitleTag(basedat.getTitle(rdat)) %>
<%= rdat.getStdBaseFontTag(3) %>
<% if (rdat.noSmartTags()) { %>
<META NAME="MSSmartTagsPreventParsing" CONTENT="TRUE">
<% } // end if %>
</HEAD>
<BODY BGCOLOR="#9999FF">

View File

@ -2,6 +2,7 @@
<html>
<head>
<title>About Venice</title>
<META NAME="MSSmartTagsPreventParsing" CONTENT="TRUE">
</head>
<body bgcolor="white">

View File

@ -18,6 +18,7 @@
-->
<HEAD>
<TITLE>Venice HTML Tags Reference</TITLE>
<META NAME="MSSmartTagsPreventParsing" CONTENT="TRUE">
</HEAD>
<BODY>
<FONT FACE="Arial, Helvetica" SIZE=2>