Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [HTML] walidacja
tomek_13
post
Post #1





Grupa: Zarejestrowani
Postów: 42
Pomógł: 0
Dołączył: 21.06.2009

Ostrzeżenie: (0%)
-----


na stronie mam taki kod
  1. <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAXgXwfGAnPzz8ZpdaTDarQxw553dNt40Sn1Pc3iNK2E4valeYTRSHHNv_rkgGyr9u
    ah6IDZFo9pCf4A&hl=com"
    type="text/javascript"></script>


podczas walidacji wyskakuja mi takie bledy
  1. Error Line 47, Column 51: general entity "v" not defined and no default entity
  2. Line 47, Column 52: reference not terminated by REFC delimiter
  3. Line 47, Column 52: reference to entity "v" for which no system identifier could be generated
  4. Warning Line 47, Column 55: cannot generate system identifier for general entity "key"


i inne tego typu odnosnie tylko tej linijki

Ten post edytował tomek_13 17.10.2009, 13:36:19
Go to the top of the page
+Quote Post
Fifi209
post
Post #2





Grupa: Zarejestrowani
Postów: 4 655
Pomógł: 556
Dołączył: 17.03.2009
Skąd: Katowice

Ostrzeżenie: (0%)
-----


a jakbyś zamiast <script src=""
wpisał <script type="text/javascript" src=""

?
Go to the top of the page
+Quote Post
Meares
post
Post #3





Grupa: Zarejestrowani
Postów: 102
Pomógł: 13
Dołączył: 16.10.2009
Skąd: Łódź

Ostrzeżenie: (0%)
-----


Walidator odczytuje ci &v, które znajduje się w adresie skryptu jako encję i próbuje zamienić ją na tekst, ale nie została zdefiniowana w DTD. To samo tyczy się &key. Proponuję postawić przed & znak "\", który każe walidatorowi potraktować ją jako zwykły znak, a nie encję. Oczywiście nie wstawiaj go przed każdym & w skrypcie, tylko w tym adresie.
Jeszcze jedno - zamiast <script></script> daj <script src="" type="" />. (IMG:style_emoticons/default/winksmiley.jpg)

@up: Po co ma dawać <script type="..." src="..." /> skoro ma <script src="..." type="..." />? Przecież to tylko zmiana kolejności, która dla walidatora nie ma znaczenia...
Go to the top of the page
+Quote Post
tomek_13
post
Post #4





Grupa: Zarejestrowani
Postów: 42
Pomógł: 0
Dołączył: 21.06.2009

Ostrzeżenie: (0%)
-----


wstawienie tego znaku "\" nic nie daje
walidator pokazuje przykladowo cos takiego
  1. ttp://maps.google.com/maps?file=api&v=2&key=ABQIAAAAXgXwfGAnPzz8ZpdaTDarQxR55
  2.  
  3.  
  4. An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".
  5.  
  6. Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&amp;" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.
  7.  
  8. If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.
  9.  
  10. Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.
  11.  

w tym wyjasnieniu jest taki odnosnik http://www.w3.org/QA/2005/04/php-session
tam jest cos odnosnie zmiany na serwerze
ale tego nie moge zrobic bo serwer nie moj
wie ktos jak rozwiazc ten problem
Go to the top of the page
+Quote Post
kipero
post
Post #5





Grupa: Zarejestrowani
Postów: 233
Pomógł: 50
Dołączył: 28.10.2006
Skąd: Radom

Ostrzeżenie: (0%)
-----


Zamień wszystkie & w adresach na &amp;
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 18:34