We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Наші добровольці ще не переклали статтю цією мовою: Українська. Долучайтеся й допоможіть це зробити!
Ви також можете прочитати цю статтю іншою мовою: English (US).


URIError: malformed URI sequence (Firefox)
URIError: URI malformed (Chrome)

Error type


What went wrong?

URI encoding or decoding wasn't successful. An argument given to either the decodeURI, encodeURI, encodeURIComponent,  or decodeURIComponent function was not valid, so that the function was unable encode or decode properly.



Encoding replaces each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. An URIError will be thrown if there is an attempt to encode a surrogate which is not part of a high-low pair, for example:

// "URIError: malformed URI sequence"

// "URIError: malformed URI sequence"

A high-low pair is ok. For example:

// "%F0%90%8F%BF"


Decoding replaces each escape sequence in the encoded URI component with the character that it represents. If there isn't such a character, an error will be thrown:

// "URIError: malformed URI sequence"

With proper input, this should usually look like something like this:

// "JavaScript_шеллы"

See also

Мітки документа й учасники

Зробили внесок у цю сторінку: thornedlove, fscholz
Востаннє оновлена: thornedlove,