1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 10:37:20 +00:00

Fix various Fomantic UI and htmx problems (#33851)

Also fix #31328, fix #33854
This commit is contained in:
wxiaoguang
2025-03-12 02:35:05 +08:00
committed by GitHub
parent 651ef66966
commit 91610a987e
8 changed files with 16 additions and 68 deletions

View File

@ -754,17 +754,9 @@ $.api = $.fn.api = function(parameters) {
;
},
urlEncodedValue: function(value) {
var
decodedValue = window.decodeURIComponent(value),
encodedValue = window.encodeURIComponent(value),
alreadyEncoded = (decodedValue !== value)
;
if(alreadyEncoded) {
module.debug('URL value is already encoded, avoiding double encoding', value);
return value;
}
module.verbose('Encoding value using encodeURIComponent', value, encodedValue);
return encodedValue;
// GITEA-PATCH: always encode the value.
// Old code does "decodeURIComponent" first to guess whether the value is encoded, it is not right.
return window.encodeURIComponent(value);
},
defaultData: function() {
var