php4 and encoded ampersands (was Re: [WSG] google and validation)

2008-10-20 Thread Michael MD



not a third party on the planet that knows how to write a valid script tag
or encode ampersands...


I've sometimes had to modify existing php and perl scripts to handle encoded
ampersands.
It seems that neither php 4's $_GET or $_REQUEST nor perl's param handle
encoded ampersands in query strings
(you often end up with amp;key rather than just key) so I often have to
handle this in the script itself.

Its not hard to do but if there are are lot of scripts or messy legacy code
it can add a bit of hassle.








***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: php4 and encoded ampersands (was Re: [WSG] google and validation)

2008-10-20 Thread David Dorward
Michael MD wrote:
 not a third party on the planet that knows how to write a valid
 script tag
 or encode ampersands...

 I've sometimes had to modify existing php and perl scripts to handle
 encoded
 ampersands.
 It seems that neither php 4's $_GET or $_REQUEST nor perl's param
 handle
 encoded ampersands in query strings
 (you often end up with amp;key rather than just key) so I often
 have to
 handle this in the script itself.
This sounds like an error in the URL, not in the parser.

In a URL, an  character as data should be represented as %26

In a URL, an  character as a query string part separator should be
represented as 

In HTML (including an HTML representation of a URL), an  character
should be represented as amp;

The user agent (e.g. browser, bot, etc) should decode the amp; in the
HTML to get  in the DOM, so when it requests the URL from the
webserver, it requests .

It sounds like amp; is being requested. So the fault is in the tool
making the request, not in the tool parsing it.

-- 
David Dorward
http://dorward.me.uk/



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] google and validation

2008-10-19 Thread Ben Buchanan
 Hi, I am just curious how many people in this list actually spend extra
 time making a validation error free page for the sake of validation when
 third party's code is embedded. Surely the above example is an easy fix, but
 how about embedding google calendar or other scripts?

Wherever possible, yes. It removes noise from debugging/validation reports.
The most common errors are pretty easy to fix, too - it seems there's not a
third party on the planet that knows how to write a valid script tag or
encode ampersands... but other than that it's often ok from a validation
point of view.
cheers,
Ben


-- 
--- http://weblog.200ok.com.au/
--- The future has arrived; it's just not
--- evenly distributed. - William Gibson


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] google and validation

2008-10-19 Thread Brett Patterson
So, Gunlaug, in essence, (essence being the operative word), you do validate
your site by using tidy? Correct? I mean if you trust tidy to correct your
code and all the code that tidy puts out is, as you say, 99.9% effective
then that is kinda like validating, right?

And Ben, are you saying you validate or not?


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] google and validation

2008-10-19 Thread tee


On Oct 18, 2008, at 8:07 PM, Brett Patterson wrote:

I understand what you are saying to a degree. But what YOU don't  
understand is that by validating a page, you are more ensured that  
your page will work for everyone. So it is an easy fix, but it has  
nothing to do with embedding Google calendar or other scripts. It is  
just a link. Whereas embedding means actually having the calendar  
visible in the page. A COMPLETELY different story. If you don't  
validate then you cannot know any mistakes that may make users  
frustrated and/or leave the site. Also, others, such as those who  
are using the site through a screen reader may not be able to. That  
is the first thing any halfway decent coder/designer/developer  
knows. And I am not implying that you are no good, but you really  
need to rethink about validation.






Brett, I also understand what you were saying to a degree, however I  
don't think you really get what I was curious about how other deal  
with this.



I used to be so proud displaying 'xhtml/css validated' label on every  
site I built, I stopped doing that maybe two years or a year ago, but  
by not doing that, I was not going backward, and stopped caring  
whether my codes validate or not.


Today, if it's an easy fix, even a bit difficult ones, I always spend  
extra time fixing the validation errors.


I think I am always in progress as far as web standard concerns, I  
have learned the good and better practice from this list, and I apply  
them to my work, and I rarely need to worry whether a page I code from  
scratch will break due to the missing closing tag or extra div placing  
in a wrong place. But my pragmatic side and the common sense taught me  
better in term of web standards and accessibility I think, I deliver  
every project to my clients with professional pride and clear  
conscious that I have done the best I could possibly done in terms of  
the accessibility and cleaner code concerned, though they may not be  
pixel perfect in IE 6, but I know in full knowledge that none of my  
clients will come back to me saying something is broken when they  
started adding content or their customers told them some area on their  
the site don't work and cause by validation errors. There is also a  
provision that whoever updates the site, and who misses a closing tag  
or inserting an improper tag, the page won't break.


Every site I built, is using xhtml 1.0 strict doctype (not interested  
to enter the html strict vs xhtml strict argument). So if it's just a  
matter of 'ampersand' in the link from a third party script, I will  
fix it not for the sake of validation, but to make myself feel better  
that 'I do care'. But if I am embedding, say, an iframe, I am not  
gonna to replace the iframe for the sake of validation, then google  
for a JS script (since I can't write one myself) to make IE handles  
object tag so that I can showoff: see, another xhtm/css validated site  
I just did. Well, I admit I used to use validated tag to make flash  
validate when I first started learning web standards, but over the  
years, I have learned far more important things about web standards  
and accessibility that I can afford to not care a few validations  
errors caused by iframe or .




As far as writing another IE script, is it that hard for you to do?  
To help users that may view your site, view it trouble free?





Huh?
I googled this:
http://www.sharealayout.com/tutorials/replacing-the-IFRAME-by-the-OBJECT-in-XHTML-1.1/157/4/
If you think it worths all the trouble to make IE the inferior browser  
behaves like a Grade A ones, perhaps you are missing the substance of  
web standards?


Just my humble 2 cents.


tee


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] google and validation

2008-10-19 Thread Ben Buchanan
And Ben, are you saying you validate or not?

I aim for sites to validate unless there's an immovable reason why not
(unmodifiable third party code, legally locked code, unable to prevent users
creating errors, etc). So I suppose for your scenario the simpler answer is
just yes, because the code's in your control.

cheers,

Ben

-- 
--- http://weblog.200ok.com.au/
--- The future has arrived; it's just not
--- evenly distributed. - William Gibson


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] google and validation

2008-10-19 Thread Gunlaug Sørtun

Brett Patterson wrote:
So, Gunlaug, in essence, (essence being the operative word), you do 
validate your site by using tidy? Correct? I mean if you trust tidy 
to correct your code and all the code that tidy puts out is, as you 
say, 99.9% effective then that is kinda like validating, right?


Pretty much so, although tidying is an active process while validating
is pretty passive.

http://www.gunlaug.no/contents/wd_1_07.html

If my Tidy gives up on my markup, then it's time to ask the validator.
In such cases I go back and forth between validating, tidying and
cross-browser checking until the problem is tidy, valid and solved.

May I add that I don't really trust any software - my own creations
included. So, when I'm really bored I attack 'em with all I've got and
then some. My Tidy has survived all my attacks quite well.

Always some weak spots that may be overcome by cross-checking and making
notes on what to look out for.
My Tidy disagrees with the validator on a few points - like MSIE
down-level conditional comments, and I haven't bothered fixing my Tidy
on these points since the ones I've encountered are so few and easy to
remember.

Otherwise I think Dave Raggett got it more or less right in the original...
http://www.w3.org/People/Raggett/tidy/
...but, as I say in my article, I'm not impressed by what others have
done to Tidy later. Some releases/attachments are ok, while others are
crippled by someone's personal preferences.

regards
Georg
--
http://www.gunlaug.no


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



[WSG] google and validation

2008-10-18 Thread designer
Hello all,

A client wants a link to google maps to shows where a property is located
(there are 30+ properties, so 30+ pages with links to google maps).

The trouble is, the pages no longer validate because of the url needed to
get to the map. An example is:

a
href=http://maps.google.co.uk/maps?f=qhl=engeocode=q=pl28+8jsie=UTF8ll=50.524341,-5.02367spn=0.017789,0.038624t=hz=15;

Just changing the 's to amp;'s doesn't seem to do it . . .

I feel sure someone has encountered this, and overcome it?

Thanks,

Bob



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***


Re: [WSG] google and validation

2008-10-18 Thread Svip
Care to tell us what exactly the validator tells you is wrong?

/Svip

2008/10/18 designer [EMAIL PROTECTED]

  Hello all,

 A client wants a link to google maps to shows where a property is located
 (there are 30+ properties, so 30+ pages with links to google maps).

 The trouble is, the pages no longer validate because of the url needed to
 get to the map. An example is:

 a
 href=
 http://maps.google.co.uk/maps?f=qhl=engeocode=q=pl28+8jsie=UTF8ll=50.524341,-5.02367spn=0.017789,0.038624t=hz=15
 

 Just changing the 's to amp;'s doesn't seem to do it . . .

 I feel sure someone has encountered this, and overcome it?

 Thanks,

 Bob


 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] google and validation

2008-10-18 Thread designer



From: Svip
To: wsg@webstandardsgroup.org


Care to tell us what exactly the validator tells you is wrong?

/Svip


2008/10/18 designer [EMAIL PROTECTED]

Hello all,

A client wants a link to google maps to shows where a property is located
(there are 30+ properties, so 30+ pages with links to google maps).

The trouble is, the pages no longer validate because of the url needed to
get to the map. An example is:

a
href=http://maps.google.co.uk/maps?f=qhl=engeocode=q=pl28+8jsie=UTF8ll=50.524341,-5.02367spn=0.017789,0.038624t=hz=15;

Just changing the 's to amp;'s doesn't seem to do it . . .

I feel sure someone has encountered this, and overcome it?

Thanks,

Bob



Hi Svip,

There are several ampersands as you see, but also this:

Line 84, Column 77: reference not terminated by REFC delimiter.
…maps?f=qhl=engeocode=q=pl28+8jsie=UTF8ll=50.524341,-5.02367spn=0.017789If 
you meant to include an entity that starts with , then you should 
terminate it with ;. Another reason for this error message is that you 
inadvertently created an entity by failing to escape an  character just 
before this text.


which refers to the '=' before the utf8. Or is it all  that cause the 
problem?  That single URL finds 24 errors altogether.


???

Thanks,

Bob




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] google and validation

2008-10-18 Thread Hassan Schroeder

designer wrote:

which refers to the '=' before the utf8. Or is it all  that cause the 
problem?  That single URL finds 24 errors altogether.


Did you change them all? Because that's all I had to do to make your
sample validate...

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-621-3445   === http://webtuitive.com

  dream.  code.


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] google and validation

2008-10-18 Thread Brett Patterson
This is a good question. I would recommend the following page to view.
http://www.htmlhelp.com/tools/validator/problems.html#amp

Here is the code that works for me:

a href=
http://maps.google.co.uk/maps?f=qamp;hl=enamp;geocode=amp;q=pl28+8jsamp;ie=UTF8amp;ll=50.524341,-5.02367amp;spn=0.017789,0.038624amp;t=hamp;z=15;You
can link here!/a


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] google and validation

2008-10-18 Thread tee


On Oct 18, 2008, at 12:20 PM, Brett Patterson wrote:

This is a good question. I would recommend the following page to  
view. http://www.htmlhelp.com/tools/validator/problems.html#amp


Here is the code that works for me:

a href=http://maps.google.co.uk/maps?f=qamp;hl=enamp;geocode=amp;q=pl28+8jsamp;ie=UTF8amp;ll=50.524341,-5.02367amp;spn=0.017789,0.038624amp;t=hamp;z=15 
You can link here!/a



Hi, I am just curious how many people in this list actually spend  
extra time making a validation error free page for the sake of  
validation when third party's code is embedded. Surely the above  
example is an easy fix, but how about embedding google calendar or  
other scripts?


I am not implying validation isn't important nor should be ignored.  
But as we in this list know it's not something that matters much as  
far as accessible site concerns. Do people today actually still trying  
to make the page validate by way of proper xhtml markup that may  
create problem in IE and then write another script to hack the IE?


tee






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] google and validation

2008-10-18 Thread Brett Patterson
I understand what you are saying to a degree. But what YOU don't understand
is that by validating a page, you are more ensured that your page will work
for everyone. So it is an easy fix, but it has nothing to do with embedding
Google calendar or other scripts. It is just a link. Whereas embedding means
actually having the calendar visible in the page. A COMPLETELY different
story. If you don't validate then you cannot know any mistakes that may make
users frustrated and/or leave the site. Also, others, such as those who are
using the site through a screen reader may not be able to. That is the first
thing any halfway decent coder/designer/developer knows. And I am not
implying that you are no good, but you really need to rethink about
validation. As far as writing another IE script, is it that hard for you to
do? To help users that may view your site, view it trouble free?

On Sat, Oct 18, 2008 at 9:00 PM, tee [EMAIL PROTECTED] wrote:


 On Oct 18, 2008, at 12:20 PM, Brett Patterson wrote:

  This is a good question. I would recommend the following page to view.
 http://www.htmlhelp.com/tools/validator/problems.html#amp

 Here is the code that works for me:

 a href=
 http://maps.google.co.uk/maps?f=qamp;hl=enamp;geocode=amp;q=pl28+8jsamp;ie=UTF8amp;ll=50.524341,-5.02367amp;spn=0.017789,0.038624amp;t=hamp;z=15http://maps.google.co.uk/maps?f=qhl=engeocode=q=pl28+8jsie=UTF8ll=50.524341,-5.02367spn=0.017789,0.038624t=hz=15You
 can link here!/a



 Hi, I am just curious how many people in this list actually spend extra
 time making a validation error free page for the sake of validation when
 third party's code is embedded. Surely the above example is an easy fix, but
 how about embedding google calendar or other scripts?

 I am not implying validation isn't important nor should be ignored. But as
 we in this list know it's not something that matters much as far as
 accessible site concerns. Do people today actually still trying to make the
 page validate by way of proper xhtml markup that may create problem in IE
 and then write another script to hack the IE?

 tee







 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] google and validation

2008-10-18 Thread Gunlaug Sørtun

tee wrote:

Hi, I am just curious how many people in this list actually spend 
extra time making a validation error free page for the sake of 
validation when third party's code is embedded. Surely the above 
example is an easy fix, but how about embedding google calendar or 
other scripts?


I rarely ever spend extra time on it, but I do like to save time on
debugging later by checking and cleaning up my own and third party's
code early - and often. If something is going to break anyway, it better
break early.


I use the one click - 1/10 of a second processing in HTML Tidy
shortcut all the time, which means I actually have problems creating or
leaving non-valid parts in a page even when wanting to - for
testing-purposes and alike.

Embedded scripts are automatically commented out by my Tidy - thus
ignored by the validator, so no problems there.

Google code and similar sometimes means my Tidy performs
doctype-downgrading, which isn't much of a problem either, IMO. If the
source-code is only good for Transitional, then Transitional it is.

If I want a pass on Strict when Tidy says it is only Transitional,
I'll have to perform the extra tidying and testing myself to make sure
it works, before calling on Tidy again to check and confirm.

Sometimes I even validate my work, but not often since my Tidy got it
right in 99.9% of all cases anyway. The validator does a better job at
informing me about what's wrong than Tidy does though, so if I'm more
confused than usual the validator is a nice to have.


The cleaning-up process I'm very much depending on in my daily work,
seems to only work properly with the original, customized, Tidy-version
integrated in my old editor though, which is why I haven't changed basic
editing-tool for my own work for years. I'll probably have to customize
it, and my Tidy, for (X)HTML 5 one day, so it doesn't trip on new
elements and attributes.

I normally only use my much newer and more user-friendly editors when
I'm looking at other people's pages - like yours :-) - since I've found
their newer Tidy-versions (if they have one) and integration of it near
useless. They seem to have become too lenient, and many of the
integrated Tidy's are almost set in stone and can't be properly
customized through the interface no matter what.

I am not implying validation isn't important nor should be ignored. 
But as we in this list know it's not something that matters much as 
far as accessible site concerns. Do people today actually still 
trying  to make the page validate by way of proper xhtml markup that 
may  create problem in IE and then write another script to hack the 
IE?


Validation _isn't_ important at all in itself, but making sure the
markup and whatever else is in there is actually in accordance with
specs before one starts to curse various browsers for their failures,
sure makes those curses more valid :-)

After all: most cross-browser problems are caused by invalid and/or
nonsensical markup and CSS, so quickly knowing in which direction one
should direct those curses saves time and frustration.

Can't say I've seen IE fail because of validity, but of course one in
rare cases has to add something (still valid) to the markup in order to
avoid an IE bug or two. Nearly all IE bugs can be fixed without touching
the markup though - if the source-code is valid and logical, and, as
mentioned, embedded scripts don't create validity-problems.

regards
Georg
--
http://www.gunlaug.no


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***