Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

ampersand in dynamic names

LEGEND ,
Jun 26, 2007 Jun 26, 2007

Copy link to clipboard

Copied

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


TOPICS
Server side applications

Views

251
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 26, 2007 Jun 26, 2007

Copy link to clipboard

Copied

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/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 26, 2007 Jun 26, 2007

Copy link to clipboard

Copied

LATEST
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/


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines