| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -168,7 +168,7 @@ void BindingData::Format(const FunctionCallbackInfo<Value>& args) { | |||
| 168 | 168 | out->hash = std::nullopt; | |
| 169 | 169 | } | |
| 170 | 170 | ||
| 171 | - if (unicode) { | ||
| 171 | + if (unicode && out->has_hostname()) { | ||
| 172 | 172 | out->host = ada::idna::to_unicode(out->get_hostname()); | |
| 173 | 173 | } | |
| 174 | 174 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -140,3 +140,8 @@ assert.strictEqual( | |||
| 140 | 140 | url.format(new URL('http://user:pass@xn--0zwm56d.com:8080/path'), { unicode: true }), | |
| 141 | 141 | 'http://user:pass@测试.com:8080/path' | |
| 142 | 142 | ); | |
| 143 | + | ||
| 144 | + assert.strictEqual( | ||
| 145 | + url.format(new URL('tel:123')), | ||
| 146 | + url.format(new URL('tel:123'), { unicode: true }) | ||
| 147 | + ); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments