Problem Note 13433: The Protectspecialchars= option is not honored when specified within the
SystemTitle and SystemFooter elements
When the ProtectSpecialChars= attribute is specified within the
SystemTitle or SystemFooter style elements, it is ignored by the title
or footnote in the HTML destination.
Specifying the argument "off" for this attribute, allows the string to
pass unprotected. Therefore, if the string contained a HTML tag, it
maintains the proper meaning rather than being encoded by ODS and
displayed as text.
The title statement below should appear on 2 lines because the <BR> HTML
tag is specified in the middle of the title. However, because the <BR>
html tag is protected, it is displayed as <br> rather than breaking the
line. Viewing the source of the HTML file would show the tag encoded as
<BR>. This will not work using in-line styles as well.
title "This title <br> will break";
There are two approaches that we can use to get around this problem.
1) If the first and last tag in the string are HTML tags, then ODS
unprotects this string by default. By adding HTML blocking tags
such as the <div></div> to the beginning and end of the string,
the tags are unprotected.
title "<div> this title <br> will break</div>";
2) By adding the level of protection at the document level rather
than the title or footnote level, this will also unprotect the
titles and all other parts of the document.
proc template;
define style styles.test;
parent=styles.default;
replace Document from Container /
htmldoctype =
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'
htmlcontenttype = 'text/html'
protectspecialchars = off
linkcolor = colors('link2')
visitedlinkcolor = colors('link1');
end;
run;
ods html file="temp.html" style=styles.test;
proc print data=sashelp.class;
title "this title <br> will break";
run;
ods html close;
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows XP Professional | 9.1 TS1M0 | 9.2 TS1M0 |
| Microsoft Windows NT Workstation | 9.1 TS1M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | 9.2 TS1M0 |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | 9.2 TS1M0 |
| Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | 9.2 TS1M0 |
| Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | 9.2 TS1M0 |
| Microsoft Windows 2000 Server | 9.1 TS1M0 | 9.2 TS1M0 |
| Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | 9.2 TS1M0 |
| Microsoft Windows 2000 Professional | 9.1 TS1M0 | 9.2 TS1M0 |
| 64-bit Enabled Solaris | 9.1 TS1M0 | 9.2 TS1M0 |
| Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | 9.2 TS1M0 |
| z/OS | 9.1 TS1M0 | 9.2 TS1M0 |
| 64-bit Enabled AIX | 9.1 TS1M0 | 9.2 TS1M0 |
| OpenVMS Alpha | 9.1 TS1M0 | 9.2 TS1M0 |
| 64-bit Enabled HP-UX | 9.1 TS1M0 | 9.2 TS1M0 |
| HP-UX IPF | 9.1 TS1M0 | 9.2 TS1M0 |
| Linux | 9.1 TS1M0 | 9.2 TS1M0 |
| Tru64 UNIX | 9.1 TS1M0 | 9.2 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | medium |
| Topic: | SAS Reference ==> ODS (Output Delivery System)
|
| Date Modified: | 2008-01-21 15:14:16 |
| Date Created: | 2004-09-27 10:35:52 |