File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/vs/workbench/contrib/notebook/browser/view/renderers Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -767,7 +767,8 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Themable {
767
767
const uri = URI . parse ( data . href ) ;
768
768
this . _handleNotebookCellResource ( uri ) ;
769
769
} else if ( ! / ^ [ \w \- ] + : / . test ( data . href ) ) {
770
- this . _handleResourceOpening ( data . href ) ;
770
+ // Uri without scheme, such as a file path
771
+ this . _handleResourceOpening ( tryDecodeURIComponent ( data . href ) ) ;
771
772
} else {
772
773
// uri with scheme
773
774
if ( osPath . isAbsolute ( data . href ) ) {
@@ -1795,3 +1796,11 @@ function getTokenizationCss() {
1795
1796
const tokenizationCss = colorMap ? generateTokensCSSForColorMap ( colorMap ) : '' ;
1796
1797
return tokenizationCss ;
1797
1798
}
1799
+
1800
+ function tryDecodeURIComponent ( uri : string ) {
1801
+ try {
1802
+ return decodeURIComponent ( uri ) ;
1803
+ } catch {
1804
+ return uri ;
1805
+ }
1806
+ }
You can’t perform that action at this time.
0 commit comments