Ampersands in quoted strings


Home
Products
Corporate
Support
Download
Search







There is a side-effect of having the ability to refer to variables inside quoted strings. In earlier versions of pop!siteTM, you had to use a full expression to get a variable's value inside a string, like this:

&(imagePath = "c:\images");
<img src=&(imagePath + "/picture.gif");>

We made it easier to do this by allowing:

&(imagePath = "c:\images");
<img src="&imagePath/picture.gif">

This means that pop!site looks for variables inside quoted strings (like most attribute values). The unfortunate side-effect is that you can no longer use the ampersand character '&' directly in quoted strings.

Supposing you really want an ampersand in the generated HTML. The workaround is to do this:

&(ampersand = "&");

and then:

<a href="https://www.someserver.com/cgi-bin/master&ampersand;query=xyz">

This will cause an ampersand to be placed into the final HTML, and the result will be:

<a href="https://www.someserver.com/cgi-bin/master&query=xyz">
 


powered by pop!site Copyright 1995-1997. Pragmatica, Inc. All Rights reserved.
Pragmatica, pop!site and pop!talk are trademarks of Pragmatica, Inc.
Modified: 10 March, 1997 18:24:56

Page Feedback
Webmaster Contact