[thelist] Two XHTML validity questions in a CF site
.jeff
jeff at members.evolt.org
Thu Jul 12 12:17:05 CDT 2001
aaron,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Aaron Cole
:
: 1) I use the ParagraphFormat CF function
: which adds a <P> to posts every time
: the user enters two hard returns.
: Obviously, the lack of a closing tag
: isn't kosher. Are there any alternatives?
: Adding a <br /> instead would be great.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
it might sound great, but won't be the most correct html possible. instead,
you should be closing those paragraphs. the solution is to stop using the
ParagraphFormat() function. do this instead:
<p>
#Replace(myString, Chr(13), "</p><p>", "ALL")#
</p>
you have the added bonus of being able to apply align, class, and any other
attributes you want to the paragraphs.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: 2) The Validator is not happy with the variables
: that I need to pass in some of my hrefs.
: Ideas to get around this?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
yeah, ampersands in urls need to be properly escaped.
index.cfm?foo=bar&bar=foo
or better yet, skip using the query string altogether and get the bonus
side-effect of improving your search engine indexability. for example:
http://www.evolt.org/user/jeff/15/index.html
(yes, those really are variables in the url and not actual directories)
good luck,
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list