浏览代码

Only load trusted iframe (#23245)

Rohan Sharma 3 年之前
父节点
当前提交
0c31bc605e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/index.html

+ 1 - 1
docs/index.html

@@ -498,7 +498,7 @@
 			const oldIframe = iframe;
 			const oldIframe = iframe;
 			iframe = oldIframe.cloneNode();
 			iframe = oldIframe.cloneNode();
 
 
-			if ( hash ) {
+			if ( hash && titles[ splitHash[ 0 ] ] ) {
 
 
 				iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ];
 				iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ];
 				subtitle = titles[ splitHash[ 0 ] ] + splitHash[ 1 ] + ' – ';
 				subtitle = titles[ splitHash[ 0 ] ] + splitHash[ 1 ] + ' – ';