/    Sign up×
Community /Pin to ProfileBookmark

What Functions Play To Echo Safely User Submitted Urls & Links ?

Hi,

Do these fall under the encoding category ?
urlencode()
rawurlencode()
int()
int_val()

Before outputting user inputted links on your pages, you use these functions, I know:
urlencode()
rawurlencode()
int()

But are there any other functions you make use of during echoing user submitted urls/links ?
I am not talking about user submitted html code cos I know to echo user submitted html you might need to use following so your page’s html are not broken due to bad code or malicious code submitted by your users:
htmlentities()
htmlspecialchars.
But I am talking about echoing on your page, user submitted pure url or links.
What other functions should I be looking into apart from these that deal with securely echoing user submitted urls & links on your pages ?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@novice2022authorJun 05.2022 — Hi,

Are there any other php functions that I should be looking into to achieve my purpose mentioned above ?
×

Success!

Help @novice2022 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...