If one of the options you select in an activeselector contains an & then the callback function doesn't receive the full option string. It is encoded as %26, but this doesn't seem to help. The following change fixes the problem for me by doubly encoding the & as %2526. The problem may be related to clean urls, which I have enabled.
- var optionString = this.input.options[i].value.replace(/\|/g, '|') +'|'+ this.input.options[i].text.replace(/\|/g, '|');
+ var optionString = encodeURIComponent(this.input.options[i].value.replace(/\|/g, '|') +'|'+ this.input.options[i].text.replace(/\|/g, '|'));
Comments
Comment #1
wrunt commentedI've got a fix that works for sources with both & and / characters in them, but it only works if you have clean urls enabled. It seems that the rewrite rules for clean urls do some decoding of escaped characters, so you need to encode them twice, then decode them once in activeselect_explode_values.
Here's the fix:
Comment #2
wrunt commentedIt looks like there's already a function to work around these issues:
Comment #3
geodaniel commentedsubscribing
Comment #4
nterbogt commentedThis is still an issue for me too.
Does anyone have any thoughts about doing the encoding at a PHP level instead of at the javascript level when returning a value?
Comment #5
hazaThis version of Active Select is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.