Skip to content

SourceMappingUrl needs to be percent-encoded #40951

Closed
@uniqueiniquity

Description

@uniqueiniquity

TypeScript Version: 4.1.0-dev.20201005

Search Terms: url encoded, sourcemappingurl

Code

// @filename: ①Ⅻㄨㄩ 啊阿鼾齄丂丄狚狛狜狝﨨﨩ˊˋ˙–⿻〇㐀㐁䶴䶵U1[]U2[]U3[].ts
var a = 1;
var b = 2;
var c = 3;

Expected behavior:
Running tsc with sourceMap: true sets sourceMappingUrl=%E2%91%A0%E2%85%AB%E3%84%A8%E3%84%A9+%E5%95%8A%E9%98%BF%E9%BC%BE%E9%BD%84%E4%B8%82%E4%B8%84%E7%8B%9A%E7%8B%9B%E7%8B%9C%E7%8B%9D%EF%A8%A8%EF%A8%A9%CB%8A%CB%8B%CB%99%E2%80%93%E2%BF%BB%E3%80%87%E3%90%80%E3%90%81%E4%B6%B4%E4%B6%B5U1%5B%EE%80%A5%EE%80%A6%EE%80%A7%EE%80%B8%EE%80%B9%5DU2%5B%EE%89%9A%EE%89%9B%EE%89%AC%EE%89%AD%5DU3%5B%EE%93%BE%EE%93%BF%EE%94%80%EE%94%8B%EE%94%8C%5D.js.map

Actual behavior:
Running tsc with sourceMap: true sets sourceMappingUrl=①Ⅻㄨㄩ 啊阿鼾齄丂丄狚狛狜狝﨨﨩ˊˋ˙–⿻〇㐀㐁䶴䶵U1[]U2[]U3[].js.map

See the sourcemap spec which states that sourceMappingUrl needs to be percent-encoded.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions