소스 검색

[fix] title

wenliming 2 년 전
부모
커밋
ba7ab21117
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/view/iframe/publish/tool-box/child/editor.vue

+ 2 - 1
src/view/iframe/publish/tool-box/child/editor.vue

@@ -146,7 +146,8 @@ const getTitleByHtmlStr = (str = '') => {
   let tag_end = '</title>'
   let index1 = str.indexOf(tag_start) + tag_start.length;
   let index2 = str.indexOf(tag_end);
-  if (index1 < 0 || index2 < 0) {
+  
+  if (index1 < tag_start.length || index2 < 0) {
     return '';
   }