New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caret symbol not included in stored URL when using non-encode plugin #2254

pclewisnz opened this Issue May 22, 2017 · 0 comments


None yet
2 participants

pclewisnz commented May 22, 2017

I found a similar Issue that is marked solved so I suspect I've caused this by making use of a plugin that was found inside another Issue solution.. there for not a bug

My problem URL comes from a Splunk search:

The stored URL using YOURLS results in:
https://hidden/search?earliest=-15m&latest=now&q=search%20tag%3DSpeechIVR-Production%20tag%3DSpeechIVR-Log%20%20%20|%20rex%20%22.*TSAnswerPhone%3ASessionId%3A%28%3F%3CSessionId%3E[%3A]%2B%29%22%20& )

The problem for me is that [^%3A] in original gets stored as [%3A]. the caret is completely dropped so I don't think it's an encoding issue. Suspect it's special handling inside the code base (?) and my reason for logging as an issue is that it's probably unintended and caused by the plugin. I wouldn't call it a bug since plugins surely are buyer beware...

The plugin I am using is the following:

Plugin Name: Don't encode/decode
Plugin URI:
Description: Don't encode/decode submitted URLs
Version: 1.0
Author: Ozh
Author URI:

yourls_add_filter( 'encodeURI', 'stewx_no_decode' );
function stewx_no_decode( $decoded, $original ) {
    return $original;

This plugin made the Splunk URL's work perfectly (until this example).

If I deactivate the plugin the URL stored is as follows:

This URL doesn't work for us because at the first ? in this version, it's probably being interpreted as a parameter. In the versions using the plugin it's being stored "as is" which is great. Conversely the Caret in the non plugin version gets encoded.

I am using your tool on RHEL running lampp
MediaWiki 1.24.1
PHP 5.6.3 (apache2handler)
MySQL 5.6.21

I think if someone was willing to help a non-coder here - and write me a plugin that encoded only a list of characters (e.g. caret "^") but nothing else - could call it Splunk URL plugin because this tool is extremely useful for users sharing splunk searches (which can be thousands of characters long)..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment