[WEB4LIB] ampersand encoding in dreamweaver

medlib sunupnow at gmail.com
Wed Mar 30 19:53:42 EST 2005


looks like i found a DW bug. how exciting.

lots of responses here. for anyone else interested, here goes...

>Have you tried changing the code in a regular text editor like Notepad?

yes. but it's a pain in the you-know-what to do it that way.
unbelievably difficult to read the file the way Notepad displays it. i
wanted to do it in the program i'm already using to create the site.

>In preferences, code rewriting:
>check Encode <, >, &...
>choose Encode special characters in URLS using %

tried that. didn't work. on 'save' it turned 'em back into &s.

>Do your & changes in the Design, not Code mode.

yep. did. didn't work.

>You can also do a code replace for the entire site of
>& -> &amp;
>&&amp; -> &amp;

i tried that in one file at first. had to do it with the file closed
(because when i did it with the file open, it didn't keep the &amp;s).
result: i ended up with a few "&amp;amp;"s in there, so then had to do
a find/replace for those. the thought of doing this on the whole site
globally makes me break out in a cold sweat :\ ... i really hate that
DW msg about changes to closed files cannot be undone. i chicken out
almost every time.

>1. Open the file you want to change in "Code View".  If you use >the
Code and Design View, or Design View, it wont work.
>2. Change the & in the URL(s) to &amp;
>3. Hit F5 to Refresh the View
>4. Save the file

tried that. didn't work.

>I've gotten around it by editing the html files on the server/UNIX
box.  The next time you need to use DW, pull the file from the server
and it'll be fine.

not an option for me in my particular working environment, but sounds
a good option for someone else.

>I think the bug may be fixed in version 7.0.1 of Dreamweaver MX

i am using 7.0.1

>if I change a "&" to "&amp;" in the "Link" box of the....

nope. i was using Code View.

>What I've had to do is make the change, cut the URL out of the page
entirely, save the file, then paste the URL back in and save it again.

that works. but, again, labour-intensive, and it's outside DW.

so, looks like i have to pick which mickey-mouse work-around i can
stand to work with.

many thanks to all those who responded.

sunny. 






> 
> 
> medlib wrote:
> > hi folks,
> >
> > our library website has a lot of database URLs, and i'm addressing the
> > task of turning all amersands in our URLs into "&amp;" ... but
> > dreamweaver is fighting me on it.
> >
> > doesn't matter whether i use MX or MX2004, or if i toggle any of the
> > "rewrite code" options (i've toggled 'til i couldn't toggle anymore!)
> > . whenever i change a & to &amp; dreamweaver changes it back again
> > (either after save/close/re-open, or, in the case of MX2004, right
> > before my eyes on 'save').
> >
> > my blonde roots must be showing through ... what am i missing here?
> >
> > sunny.
> >
> >
> 

>>>



More information about the Web4lib mailing list