File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
sphinx/themes/basic/static Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ Bugs fixed
2828* #9481: autosummary: some warnings contain non-existing filenames
2929* #9481: c domain: some warnings contain non-existing filenames
3030* #9481: cpp domain: some warnings contain non-existing filenames
31+ * #9456: html search: abbreation marks are inserted to the search result if
32+ failed to fetch the content of the page
3133
3234Testing
3335--------
Original file line number Diff line number Diff line change @@ -282,7 +282,10 @@ var Search = {
282282 complete : function ( jqxhr , textstatus ) {
283283 var data = jqxhr . responseText ;
284284 if ( data !== '' && data !== undefined ) {
285- listItem . append ( Search . makeSearchSummary ( data , searchterms , hlterms ) ) ;
285+ var summary = Search . makeSearchSummary ( data , searchterms , hlterms ) ;
286+ if ( summary ) {
287+ listItem . append ( summary ) ;
288+ }
286289 }
287290 Search . output . append ( listItem ) ;
288291 setTimeout ( function ( ) {
@@ -498,6 +501,9 @@ var Search = {
498501 */
499502 makeSearchSummary : function ( htmlText , keywords , hlwords ) {
500503 var text = Search . htmlToText ( htmlText ) ;
504+ if ( text == "" ) {
505+ return null ;
506+ }
501507 var textLower = text . toLowerCase ( ) ;
502508 var start = 0 ;
503509 $ . each ( keywords , function ( ) {
You can’t perform that action at this time.
0 commit comments