Forum Moderators: open

Message Too Old, No Replies

Ampersands and Entity Problems

Using Frontpage 2003 or Dreamweaver MX

         

ohfiddlesticks

8:24 pm on Sep 1, 2004 (gmt 0)

10+ Year Member



I'm finally starting to attempt to make my site pass a validation check for HTML 4.01 Transitional. Much of the site is ASP and so I have many links with ampersands in them. I'm trying to fix them all to be "&" but am having some trouble.

The validator in Dreamweaver doesn't seem to find them even though I have it set to look for entities in text. I thought about doing a find and replace in Frontpage using regular expressions but I don't know exactly what to use there either.

I also am having some weirdness because I use include pages in Frontpage and eventhough the page to be included uses "&" instead of "&", they seem to be converted back to "&" upon being included in the main page...this causes the pages to not validate. I thought I was going crazy because I kept fixing it and then when I went to validate it was hosed up again.

Anyone know of an easy way to do this? Anyone know of a way to stop Frontpage from changing the "&" to "&". Any suggestions or help would be greatly appreciated. Thanks

isitreal

9:33 pm on Sep 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



if you have dreamweaver then close frontpage and leave it closed. In dreamweaver, all you have to do is do a find and replace in the source, not text, for:

&

replace with &

then to make sure there was no mistake, search for:

&&

and replace with
&

This is assuming you have already set up a 'site' for your current site in dreamweaver, then you just do a find and replace through the whole site.

If you are using asp code this will be trickier if you use & in the programming.

If it works, then never open your files in front page again, that will solve the problem instantly, this kind of default behavior is why I gave up on frontpage years ago, it can be fixed but why bother when there are other products that work much better out of the box, like dreamweaver.

ohfiddlesticks

7:19 pm on Sep 2, 2004 (gmt 0)

10+ Year Member



I do use alot of ampersands in my asp code for working with strings and such. I was hoping that there was some way to have it search just in the html or just in hyperlinks even. I guess I'll just have to do it the slow way and check every ampersand. I though Dreamweaver was supposed to catch things like that in the validation, but maybe it ignores the text in a link or something.

I use both Frontpage and Dreamweaver because I have found neither has everything I want. Frontpage messes with your code more, but so many more people have it installed. That makes it much easier to collaborate with others on a site with Frontpage. Dreamweaver also tends to lock up and shut down frequently and I never have that problem with Frontpage. So I use both for specific tasks which works for me.

Thanks for the advice.

Powdork

7:43 am on Sep 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I do use alot of ampersands in my asp code for working with strings and such.
Do these typically look the same. I f so you do the find and replace and then go and do additional find and replaces for the strings back to just ampersand. Also, you could do the find and replace on selected files within current local site.

dirkz

10:34 am on Sep 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HTML 4.01 doesn't allow amps in links?

ohfiddlesticks

5:51 pm on Sep 4, 2004 (gmt 0)

10+ Year Member



Ampersands in urls come up as errors in the html validators online like at w3.org, although not in my validator in Dreamweaver.

[htmlhelp.com...]