<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using # in a title in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-in-a-title/m-p/2112#M931</link>
    <description>Within an ods markup with the html4 tagset, I'm trying to insert some html code as a navigation tool for anchors further down the document. However, when the link comes through, the # symbol has been cut off. I can't get around this - I think SAS thinks that I am trying to reference something else with this special character. Is there a way to force it to output the character "#"?&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
&lt;BR /&gt;
proc report data=work.anything ;&lt;BR /&gt;
TITLE1 '&lt;A href="#print"&gt;Print&lt;/A&gt;';&lt;BR /&gt;
TITLE2 '&lt;A href="#content&amp;quot;"&gt;Contents&lt;/A&gt;';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Output:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://communities.sas.com/rint"&gt;Print&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://communities.sas.com/contents"&gt;Contents&lt;/A&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 18 Jan 2007 20:57:15 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-01-18T20:57:15Z</dc:date>
    <item>
      <title>Using # in a title</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-in-a-title/m-p/2112#M931</link>
      <description>Within an ods markup with the html4 tagset, I'm trying to insert some html code as a navigation tool for anchors further down the document. However, when the link comes through, the # symbol has been cut off. I can't get around this - I think SAS thinks that I am trying to reference something else with this special character. Is there a way to force it to output the character "#"?&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
&lt;BR /&gt;
proc report data=work.anything ;&lt;BR /&gt;
TITLE1 '&lt;A href="#print"&gt;Print&lt;/A&gt;';&lt;BR /&gt;
TITLE2 '&lt;A href="#content&amp;quot;"&gt;Contents&lt;/A&gt;';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Output:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://communities.sas.com/rint"&gt;Print&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://communities.sas.com/contents"&gt;Contents&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Jan 2007 20:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-in-a-title/m-p/2112#M931</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-01-18T20:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using # in a title</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-in-a-title/m-p/2113#M932</link>
      <description>Hi!&lt;BR /&gt;
  I think you may have fallen into mismatched quote land. When I submit this code using HTML4, I get the desired results as shown below. Note the matching quotes around #print and #content. (BTW, your code shows #content in the title, but your HTML source code shows #contents in the HREF -- so I used #content in my example.)&lt;BR /&gt;
   &lt;BR /&gt;
  It was my understanding that HTML attributes containing special characters or spaces had to be quoted. I think you'll get the right hyperlinks if you quote the HREF.&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html4 file='c:\temp\testhref.html';&lt;BR /&gt;
  proc print data=sashelp.class;&lt;BR /&gt;
    title '&lt;A href="#print"&gt;Print&lt;/A&gt;';&lt;BR /&gt;
    title2 '&lt;A href="#content"&gt;Contents&lt;/A&gt;';&lt;BR /&gt;
    var name age height;&lt;BR /&gt;
  run;&lt;BR /&gt;
ods html4 close;&lt;BR /&gt;
title;&lt;BR /&gt;
                        &lt;BR /&gt;
***;&lt;BR /&gt;
and my HTML source shows:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="#print"&gt;Print&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="#content"&gt;Contents&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 18 Jan 2007 23:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-in-a-title/m-p/2113#M932</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-01-18T23:59:09Z</dc:date>
    </item>
  </channel>
</rss>

