<p><?php echo text("introtext"); ?> </p> <div class="Question"> <label><?php echo $lang["termsandconditions"]; ?> </label> <div class="Terms"><?php $termstext = text("terms"); if (is_html($termstext)) { echo $termstext; } else { echo txt2html($termstext); } ?> </div> <div class="clearerleft"> </div> </div> <form method="post" action="<?php echo $baseurl_short; ?> pages/terms.php?k=<?php echo urlencode($k); ?> "> <input type=hidden name="url" value="<?php echo htmlspecialchars($url);
/** * Returns HTML for ar singleton tag * @param string $tag_name * @param dict $attributes {<attr>: <val>} * @return string HTML * */ function render_html_singleton_tag($tag_name, $attributes) { $html = '<' . $tag_name; foreach ($attributes as $attr => $val) { $val = substr(txt2html(' ' . $val . ' '), 1, -1); $html .= ' ' . $attr . '="' . $val . '"'; } $html .= ' />'; return $html; }
function htmlize($var) { $filtered = str_replace(array('"', ' ', '&', '&', '<br />', '<br>', '<BR>', '<p>', '<P>', '<3 '), array('"', ' ', '&', '&', "\n", "\n", "\n", "\n\n", "\n\n", '♥'), $var); $filtered = txt2html($filtered); return str_replace(array("\r\n", "\n", '&hearts;'), array('<br />', '<br />', '♥'), $filtered); }