Spaces in email URLs
-
I have a fix for the problem reported by StlMunky69 about a year ago.
Email value parameters (such as “?Subject=This has spaces”) have the spaces removed in the released version of Karma Click Counter. I located and fixed the problem in my copy of the Plug-In but I want to share the fix which is to escape the URL for the case where the headers are not sent.
Plug-in File: karma-clic-counter/class.KCCCounter.php
Function: redirect()
Code fragment – modified line have trailing comments “// Mark Carson”
// перенаправляем
if( headers_sent() ) {
print “<script>location.replace(‘”. esc_url($url) .”‘);</script>”;
}
else{
$escUrl = esc_url($url); // Mark Carson
//error_log(“karma-clic-counter/class.KCCCounter.php => redirect() – (headers not sent) => $escUrl”); // Mark Carson//wp_redirect( $url, 303 ); // Mark Carson
wp_redirect( $escUrl, 303 ); // Mark Carson
- The topic ‘Spaces in email URLs’ is closed to new replies.