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 @@ -21,6 +21,8 @@ Bugs fixed
2121----------
2222
2323* #9487: autodoc: typehint for cached_property is not shown
24+ * #9456: html search: abbreation marks are inserted to the search result if
25+ failed to fetch the content of the page
2426
2527Testing
2628--------
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 ( ) {
@@ -492,6 +495,9 @@ var Search = {
492495 */
493496 makeSearchSummary : function ( htmlText , keywords , hlwords ) {
494497 var text = Search . htmlToText ( htmlText ) ;
498+ if ( text == "" ) {
499+ return null ;
500+ }
495501 var textLower = text . toLowerCase ( ) ;
496502 var start = 0 ;
497503 $ . each ( keywords , function ( ) {
You can’t perform that action at this time.
0 commit comments