Encoding filter operator values to avoid url escaping browser bullshit.

pull/1129/head
Richard 11 years ago
parent 2f11241407
commit aad7606340
  1. 4
      app/assets/javascripts/angular/models/query.js
  2. 2
      app/controllers/application_controller.rb
  3. 2
      public/templates/components/back_url.html

@ -67,10 +67,10 @@ angular.module('openproject.models')
var serialised = '';
angular.forEach(params, function(value, key){
if(typeof value == "string"){
serialised = serialised + "&" + key + "=" + value;
serialised = serialised + "&" + key + "=" + encodeURIComponent(value);
} else if(Array.isArray(value)){
angular.forEach(value, function(v){
serialised = serialised + "&" + key + "=" + v;
serialised = serialised + "&" + key + "=" + encodeURIComponent(v);
});
}
});

@ -427,7 +427,7 @@ class ApplicationController < ActionController::Base
else
params[:back_url]
end
binding.pry
# if we have a back_url it must not contain two consecutive dots
if back_url.present? && !back_url.match(%r{\.\.})
begin

@ -1 +1 @@
<input type="text" name="back_url" id="back_url" value="{{backUrl}}"></input>
<input type="hidden" name="back_url" id="back_url" value="{{backUrl}}"></input>

Loading…
Cancel
Save