Use urlencode instead of htmlspecialchars

This commit is contained in:
Yarmo Mackenbach 2020-07-01 14:42:19 +02:00
parent 146385609c
commit 34cb9a073c
3 changed files with 7 additions and 7 deletions

View file

@ -1,7 +1,7 @@
<?php
$fingerprint = htmlspecialchars($_GET["fp"]);
$user = htmlspecialchars($_GET["user"]);
$fingerprint = urlencode($_GET["fp"]);
$user = urlencode($_GET["user"]);
$url = "https://lobste.rs/u/$user.json";
$check = "\[Verifying my OpenPGP key: openpgp4fpr:$fingerprint\]";

View file

@ -1,8 +1,8 @@
<?php
$fingerprint = htmlspecialchars($_GET["fp"]);
$user = htmlspecialchars($_GET["user"]);
$comment = htmlspecialchars($_GET["comment"]);
$fingerprint = urlencode($_GET["fp"]);
$user = urlencode($_GET["user"]);
$comment = urlencode($_GET["comment"]);
$url = "https://www.reddit.com/user/$user/comments/$comment.json";
$check = "\[Verifying my OpenPGP key: openpgp4fpr:$fingerprint\\\\\]";

View file

@ -2,8 +2,8 @@
include 'secrets.php';
$fingerprint = htmlspecialchars($_GET["fp"]);
$tweetId = htmlspecialchars($_GET["id"]);
$fingerprint = urlencode($_GET["fp"]);
$tweetId = urlencode($_GET["id"]);
$check = "\[Verifying my OpenPGP key: openpgp4fpr:$fingerprint\]";