Re: anchor name on URL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you do not escape the name attribute you might run into trouble
when using XHTML. Always escape attributes properly.

GOOD:
<?php
echo <<<HEREDOC
<div style="padding-bottom: 1500px;div style="padding-bottom: 1500px;">
<a href="#aynchoor" title="some_aynchoor" name="some_aynchoor">Click me</a>
</div>
<div style="padding-bottom: 1500px; background-color: #f00baa;">
<a href="#some_aynchoor" title="aynchoor" name="aynchoor">Click me too</a>
</div>
HEREDOC;
?>

BAD:
<?php
echo '<a href=#aynchoor title=some_aynchoor>Click me';
echo '<a href=#some_aynchoor title=aynchoor name=aynchoor>Click me too';
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux