Fix for bug #0000076: http:// added to links in link-manager when needed. Also more special chars. encoding.

git-svn-id: https://develop.svn.wordpress.org/trunk@1440 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
jverber 2004-06-19 04:41:34 +00:00
parent 306398d06b
commit 706b9537f2
2 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,7 @@ function category_dropdown($fieldname, $selected = 0) {
echo " <option value=\"".$row->cat_id."\"";
if ($row->cat_id == $selected)
echo " selected";
echo ">".$row->cat_id.": ".$row->cat_name;
echo ">".$row->cat_id.": ".htmlspecialchars($row->cat_name);
if ($row->auto_toggle == 'Y')
echo ' (auto toggle)';
echo "</option>\n";

View File

@ -185,6 +185,7 @@ switch ($action) {
check_admin_referer();
$link_url = $_POST['linkurl'];
$link_url = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $link_url) ? $link_url : 'http://' . $link_url;
$link_name = $_POST['name'];
$link_image = $_POST['image'];
$link_target = $_POST['target'];
@ -235,6 +236,7 @@ switch ($action) {
$link_id = $_POST['link_id'];
$link_url = $_POST['linkurl'];
$link_url = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $link_url) ? $link_url : 'http://' . $link_url;
$link_name = $_POST['name'];
$link_image = $_POST['image'];
$link_target = $_POST['target'];