I make custom module with small modification of rate widget configuration interface. With this new configuration options users can configure widget to allow authenticated users to vote multiple times, set time limit between new votes and set redirect path.

For some reason is redirect URL created with spaces before and then widget is replaced by redirect URL.

In redirect field i use something like "node/[nid]" and created URL seems like " http://www.example.com/mypathalias".

I prevent this with simple regular expression change in file rate.js on line 34:

    if (data.match(/^(\s+)?https?\:\/\/[^\/]+\/(.*)$/)) {

This is maybe problem somewhere in my site but i'm not able find reason. Where can i start debuging this?

Comments

havran’s picture

Issue summary: View changes

More information.

thomas.feichter’s picture

With a small modification also working for 7.x

//if (response.match(/^https?\:\/\/[^\/]+\/(.*)$/)) {
if (response.match(/^(\s+)?https?\:\/\/[^\/]+\/(.*)$/)) {
thomas.feichter’s picture

With a small modification also working for 7.x

//if (response.match(/^https?\:\/\/[^\/]+\/(.*)$/)) {
if (response.match(/^(\s+)?https?\:\/\/[^\/]+\/(.*)$/)) {
thomas.feichter’s picture

Issue summary: View changes

Php eat my \

lamp5’s picture

Issue summary: View changes
Status: Active » Closed (outdated)