wordpress - Sanatize title in url php -


i'm trying search based on title.

like this:

$alfred = get_the_title(); $link11 = "http://example.com/?s=$alfred"; 

the problem is:
when title is

account manager (m/w) software- / it-lösungen (non microsoft) 

it makes url:

jobsde.de/?s=accountmanager%28m/w%29software-/it-l%c3%b6sungen%28nonmicrosoft%29 

or when title

recruiting consultant (m/w) 

it becomes jobsde.de/?s=recruitingconsultant%28m/w%29

the wordpress search not give me results want. think there must way handle properly, don't know how. thoughts?

i found this

i have:

$title = get_the_title(); sanitize_title_for_query( $title ); $link5 = "http://jobsde.de/?s=$title"; 

that doesnt work. url still looks like:

jobsde.de/?s=handelsvertreterphotovoltaiksolarw%c3%a4rmepumpephotovoltaikberatersolarberater 

what code should use?

have @ urldecode

this return encoded characters defaults


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -