En:Why do I get validation errors with DTD XHTML 1.0 and MAIL2CRYPT?

From phpCMS

Jump to: navigation, search

Question: Why do I get validation errors with "DTD XHTML 1.0" and "MAIL2CRYPT"?

When I use "MAIL2CRYPT" and "DTD XHTML 1.0 Strict" with my phpCMS-powered web site, i.e. the document declaration in my header.tpl file reads:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

an error will be shown during XHTML validation, pointing me to the attribute border="0" for the "@" graphical file.

Answer: You can edit the file "/parser/include/class.mail2crypt_phpcms.php" and remove the text border="0" (it appears tree times).

(Original entry by Beate)

Question: I have another problem with making my webpages XHTML 1.0 conform when using MAIL2CRYPT. It seems that it is not valid to have a <noscript> block inside a HTML block element like <p>, table cells, and a bunch of other elements.
The W3C page validator usually gives me the following error:

document type does not allow element "noscript" here; 
missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag ...

A: If you want MAIL2CRYPT to not put a <noscript> tag there, you must give MAIL2CRYPT the fourth parameter and set it to 'paranoid', like in

<!-- MAIL2CRYPT mail@example.com,,,paranoid -->

(by Martin Jahn in the support forum)

A2: If you do want to use the <noscript> tag, you can also edit the file "/parser/include/class.mail2crypt_phpcms.php". Look for the line

$crypt .= '<noscript>'.$noscript.'</noscript>';

and change it into

$crypt .= '<object><noscript><div>'.$noscript.'</div></noscript></object>';

The <object> tag looks a bit strange here but makes the use of <noscript> possible inside for example the <p> tag.

The <div> tag inside <noscript> repairs another error, generated by the W3C validator, not allowing for a <img> tag inside <noscript>.

(by Luc Soethout)

Diese Seite in anderen Sprachen: Deutsch

Main Page: FAQ MainPage | Top Page: English FAQ MainPage

Personal tools