Howdy Steve! It's good to hear from you!
On Wed, Nov 7, 2012 at 3:46 AM, Pittsburgh Trib Steve
<
ttms...@gmail.com> wrote:
> I had the same issue when dealing with RSS code. Once again, our approaches
> are completely different.
> Either way below would work.
Awesome, thanks so much for the tips, I really appreciate it.
It's funny that you've been through the same headaches... I actually
just started using argumentless zwrite (and write) for debug
purposes... It's a great tool to check for stray vars floating around
and/or things I forgot to kill. I wish I had learned about its
usefulness years ago! :D
In this case, I think I had tried something very similar to your examples:
<pre>#[ zwrite ]#</pre>
See attached screen shot of Firebug DOM inspection.
In the attached example the markup problem is not noticeable because
there's nothing else on the page (markup-wise). As soon as I put that
code on a, for example, story page (say, at the top of the template)
then that's when all hell breaks loose on my HTML. :D
I just tried your example #1 (I changed #(zwrite)# to #[ zwrite ]# ),
and unfortunately it looks like the same problem as above. :(
<pre>
%CSPsc=1
%request=<OBJECT REFERENCE>[1@%CSP.Request]
%response=<OBJECT REFERENCE>[2@%CSP.Response]
%session=<OBJECT REFERENCE>[3@%CSP.Session]
cdPost="</pre>"
cdPre="<pre>" </pre>
In fact, the drawback here is that cdPost and cdPre are now getting
output inside the wrapping <pre></pre>, which produces this visual
output onto the page:
%CSPsc=1
%request=[1@%CSP.Request]
%response=[2@%CSP.Response]
%session=[3@%CSP.Session]
cdPost=""
cdPre="
"
The goal, at least for me, would be to get an exact output of zwrite
to my HTML page. Hence the reason why I need to escape the angle
brackets.
Your second example had similar issues (I had to tweak it slightly):
<script language="cache" runat="server">
set cdPre = "<pre>", cdPost = "</pre>"
write cdPre
zwrite
write cdPost
kill cdPre, cdPost
</script>
The output was the same as above.
So, it kinda works... but I'm looking for the contents to get escaped
so I can get a true representation of the output and so it does not
break my template's HTML. :(
But yah, I don't think we were too far about in terms of our thinking.
For me, after I realized that wrapping <pre> tags around zwrite (or
write) wasn't going to work (for my needs), my first instinct was to
write a RULE that would wrap "anything" on a template and apply
..EscapeHTML(). Unfortunately, so far, that has not worked so well on
#[ zwrite ]#/#[ write ]#. :(
I do appreciate your help though! I'm glad to know that I'm not the
only one that has take the time to prettify the output of these
commands. :D
So, it's looking like spooling is maybe going to be my best option? I
have not tested spool yet, but I'll be back with my results soon. :)
Have a great night!
Cheers,
Micky
--
Micky Hulse
Web Content Editor
The Register-Guard
3500 Chad Drive
Eugene, OR 97408
Phone:
(541) 338-2621
Fax:
(541) 683-7631
Web: <
http://www.registerguard.com>