- 1
- 2
- 3
$(".rating").each(function() {
$(this).find('input').hide();
});
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 3
+147
$(".rating").each(function() {
$(this).find('input').hide();
});
Самое интересное, что в блоке .rating никогда нет и не было input
+152
$search_string = str_replace('"', '', $search_string);
$search_string = str_replace('+', '%20', $search_string);
//$search_string = preg_replace( '#([[:punct:]])#e', '( isset($punct[\'\1\']) ? $punct[\'\1\'] : \'\')', $search_string );
$search_string = trim($search_string);
$search_string = addslashes(stripslashes(htmlspecialchars(strip_tags(rawurldecode($search_string)))));
Борямся с XSS
+170.4
<?php
$mm=strlen( $titLE);
$tit='';
for ($i=0;$i<=$mm;$i++)
{
$ss= $titLE[$i];
switch ($ss)
{
case "щ": $tit= $tit."sch"; break;
case "ч": $tit= $tit."ch"; break;
case "ш": $tit= $tit."sh"; break;
case "я": $tit= $tit."ja"; break;
case "ю": $tit= $tit."ju"; break;
case "ё": $tit= $tit."jo"; break;
case "ж": $tit= $tit."zh"; break;
case "э": $tit= $tit."e"; break;
case "Щ": $tit= $tit."Sch"; break;
case "Ч": $tit= $tit."Ch"; break;
case "Ш": $tit= $tit."Sh"; break;
case "Я": $tit= $tit."Ja"; break;
case "Ю": $tit= $tit."Ju"; break;
case "Ё": $tit= $tit."Jo"; break;
case "Ж": $tit= $tit."Zh"; break;
case "Э": $tit= $tit."E"; break;
case "ь": $tit= $tit.""; break;
case "ъ": $tit= $tit."'"; break;
case "а": $tit= $tit."a"; break;
case "б": $tit= $tit."b"; break;
case "ц": $tit= $tit."c"; break;
case "д": $tit= $tit."d"; break;
case "е": $tit= $tit."e"; break;
case "ф": $tit= $tit."f"; break;
case "г": $tit= $tit."g"; break;
case "х": $tit= $tit."h"; break;
case "и": $tit= $tit."i"; break;
case "й": $tit= $tit."j"; break;
case "к":
{
if ($str[$i+1]=="с" ) {
$tit= $tit."x";
$i=$i+1; break;}
$tit= $tit."k"; break;
}
case "л": $tit= $tit."l"; break;
case "м": $tit= $tit."m"; break;
case "н": $tit= $tit."n"; break;
case "о": $tit= $tit."o"; break;
case "п": $tit= $tit."p"; break;
case "р": $tit= $tit."r"; break;
case "с": $tit= $tit."s"; break;
case "т": $tit= $tit."t"; break;
case "у": $tit= $tit."u"; break;
case "в": $tit= $tit."v"; break;
case "ы": $tit= $tit."y"; break;
case "з": $tit= $tit."z"; break;
case "Ь": $tit= $tit."'"; break;
case "Ъ": $tit= $tit."'"; break;
case "А": $tit= $tit."A"; break;
case "Б": $tit= $tit."B"; break;
case "Ц": $tit= $tit."C"; break;
case "Д": $tit= $tit."D"; break;
case "Е": $tit= $tit."E"; break;
case "Ф": $tit= $tit."F"; break;
case "Г": $tit= $tit."G"; break;
case "Х": $tit= $tit."H"; break;
case "И": $tit= $tit."I"; break;
case "Й": $tit= $tit."J"; break;
case "К":
{
if ($str[$i+1]=="С" ) {
$tit= $tit."X";
$i=$i+1; break;}
if ($str[$i+1]=="с" ) {
$tit= $tit."X";
$i=$i+1; break;}
$tit= $tit."K"; break;
}
case "Л": $tit= $tit."L"; break;
case "М": $tit= $tit."M"; break;
case "Н": $tit= $tit."N"; break;
case "О": $tit= $tit."O"; break;
case "П": $tit= $tit."P"; break;
case "Р": $tit= $tit."R"; break;
case "С": $tit= $tit."S"; break;
case "Т": $tit= $tit."T"; break;
case "У": $tit= $tit."U"; break;
case "В": $tit= $tit."V"; break;
case "Ы": $tit= $tit."Y"; break;
case "З": $tit= $tit."Z"; break;
case " ": $tit= $tit." "; break;
default:
$end1= $tit;
}
}
?>
транслитизатор!!!!!!!