- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using ODS HTML with SAS 9.3 and want a simple footnote with a link in it. Below are four attempts:
footnote1 h=3 "Visit <a href=""http://www.sas.com""> SAS </a>";
footnote2 h=3 "<p> Visit <a href=""http://www.sas.com""> SAS </a>";
footnote3 h=3 "<p> Visit <a href=""http://www.sas.com""> SAS </a> to see good stuff";
footnote4 h=3 "<p> Visit <a href=""http://www.sas.com""> SAS to see good stuff</a>";
Footnote1 does not work. The angle brackets are htmlencoded into < etc, and I don't get a link.
Someone said if I added <p> to the front, SAS would know this is html code, and would leave the tags alone. Footnote2 works.
Then I wanted to add some text after the link. Footnote 3 does not work. Again, the angle brackets get encoded.
Footnote4 does work, because now there is no text after the link. Instead "to see good stuff" is part of the link.
Any way to get footnote3 to work?
Should I be doing this a different way?
Actual setting is Stored Process Web App where footnotes will let users drill down. But I see the same with just base SAS ods html.
Thanks,
--Q.
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
By default if the first and last character are not tags, the tag in between gets encoded. You can add HTML blocking tags to the beginning and end of the footnote statement or use the PROTECTSPACIALCHARS= style attribute within the SystemFooter style element.
footnote1 h=3 '<span>Visit <a href="http://www.sas.com"> SAS </a>'</span>;
footnote2 h=3 '<span> Visit <a href="http://www.sas.com"> SAS </a></span>';
footnote3 h=3 '<span> Visit <a href="http://www.sas.com"> SAS </a> to see good stuff'</span>;
footnote4 h=3 '<span> Visit <a href="http://www.sas.com"> SAS to see good stuff</a></span>';
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would suggest that you check your quote marks. I copied this into SAS and I see there is a quote before the <p>, then two before the http, two after, then a final one. Maybe set double quote 1 and last one to single:
E.g.
h=3 '<p> Visit <a href="http://www.sas.com"> SAS </a>';
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So without the formatting:
footnote1 h=3 'Visit <a href="http://www.sas.com"> SAS </a>';
footnote2 h=3 '<p> Visit <a href="http://www.sas.com"> SAS </a>';
footnote3 h=3 '<p> Visit <a href="http://www.sas.com"> SAS </a> to see good stuff';
footnote4 h=3 '<p> Visit <a href="http://www.sas.com"> SAS to see good stuff</a>';
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
By default if the first and last character are not tags, the tag in between gets encoded. You can add HTML blocking tags to the beginning and end of the footnote statement or use the PROTECTSPACIALCHARS= style attribute within the SystemFooter style element.
footnote1 h=3 '<span>Visit <a href="http://www.sas.com"> SAS </a>'</span>;
footnote2 h=3 '<span> Visit <a href="http://www.sas.com"> SAS </a></span>';
footnote3 h=3 '<span> Visit <a href="http://www.sas.com"> SAS </a> to see good stuff'</span>;
footnote4 h=3 '<span> Visit <a href="http://www.sas.com"> SAS to see good stuff</a></span>';
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I had tried using ProtectSpecialChars in inline formatting, but guess that won't work.
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You are correct, as this will not be applied when added via inline formatting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @RW9, but the double double quotes were intentional. I tried your suggestion and got the same results.
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Check style.
ods escapechar='~';
footnote1 h=3 "Visit ~S={url='www.sas.com' hreftag='blank' } SAS ";
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Ksharp, looks like using in-line formatting may work. To get the text at the end to be not part of the link, I added a null style:
footnote1 h=3 "Visit ~S={url='www.sas.com' } SAS~S={} to see good stuff";
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.