Revert "Revert prev commit, do not encodeURI on DataKey"

This reverts commit 04525d1e1a.
This commit is contained in:
斟酌 鵬兄 2022-08-01 02:23:34 +09:00
parent 04525d1e1a
commit c8210f2468
3 changed files with 4 additions and 4 deletions

View File

@ -53,8 +53,8 @@
{
return [
new DataKey("id", data.id)
, new DataKey("title", data.name)
, new DataKey("author", data.author)
, new DataKey("title", decodeURI(data.name))
, new DataKey("author", decodeURI(data.author))
, new DataKey("hash", data.hash)
];
}

View File

@ -96,7 +96,7 @@
IDOMElement.prototype.getDAttribute = function(name)
{
var i = this.getAttribute("data-" + name);
return i;
return i && decodeURIComponent(i);
};
IDOMElement.prototype.foreach = function(type, callback)

View File

@ -7,7 +7,7 @@
IKey.call(
this
, "data-" + name
, value ? String( value ) : ""
, value ? encodeURIComponent( String( value ) ) : ""
);
};