Skip to main content
Inspiring
June 26, 2007
Question

ampersand in dynamic names

  • June 26, 2007
  • 2 replies
  • 271 views
Hi all

I have a number of club names in the database that have an ampersand (&) in
their name.

When these records are retrieved, for example in a list of clubs, checking
the display page for W3C compliance then produces warnings.

Is there something in Dreamweave that will automatically convert '&' into
'&' in such cases?
Thanks
Chris


This topic has been closed for replies.

2 replies

Inspiring
June 26, 2007
Brilliant! Thanks very much.

Cheers

Chris

"David Powers" <david@example.com> wrote in message
news:f5r748$1s4$1@forums.macromedia.com...
> Sweens wrote:
>> I have a number of club names in the database that have an ampersand (&)
>> in their name.
>>
>> Is there something in Dreamweave that will automatically convert '&' into
>> '&' in such cases?
>
> You don't say which server model you're using, but in the case of
> PHP/MySQL, double-click the Dynamic Text element for the club name in the
> Server Behaviors panel. Then select "Encode - HTML Encode" from the Format
> menu. This surrounds the dynamic text object with htmlentitities(), which
> does the conversion for you. Other server models probably have a similar
> format feature.
>
> --
> David Powers, Adobe Community Expert
> Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
> Author, "PHP Solutions" (friends of ED)
> http://foundationphp.com/


Inspiring
June 26, 2007
Sweens wrote:
> I have a number of club names in the database that have an ampersand (&) in
> their name.
>
> Is there something in Dreamweave that will automatically convert '&' into
> '&' in such cases?

You don't say which server model you're using, but in the case of
PHP/MySQL, double-click the Dynamic Text element for the club name in
the Server Behaviors panel. Then select "Encode - HTML Encode" from the
Format menu. This surrounds the dynamic text object with
htmlentitities(), which does the conversion for you. Other server models
probably have a similar format feature.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/