@@ -558,7 +558,7 @@ static void writeJavascriptSearchData(const QCString &searchDirName)
558558 if (!sii.symbolMap .empty ())
559559 {
560560 if (j>0 ) t << " ,\n " ;
561- t << " " << j << " : \" " << sii.name << " \" " ;
561+ t << " " << j << " : \" " << convertToJSString ( sii.name , true , false ) << " \" " ;
562562 j++;
563563 }
564564 }
@@ -572,7 +572,7 @@ static void writeJavascriptSearchData(const QCString &searchDirName)
572572 if (!sii.symbolMap .empty ())
573573 {
574574 if (j>0 ) t << " ,\n " ;
575- t << " " << j << " : \" " << convertToXML (sii.getText ()) << " \" " ;
575+ t << " " << j << " : \" " << convertToJSString ( convertToXML (sii.getText ()), true , false ) << " \" " ;
576576 j++;
577577 }
578578 }
@@ -653,11 +653,11 @@ static void writeJavasScriptSearchDataPage(const QCString &baseName,const QCStri
653653 ti << " ['" << id << " _" << cnt++ << " ',['" ;
654654 if (next==SearchTerm::LinkInfo () || it->word !=word) // unique result, show title
655655 {
656- ti << convertToXML (term.title );
656+ ti << convertToJSString ( convertToXML (term.title ), true , true );
657657 }
658658 else // multiple results, show matching word only, expanded list will show title
659659 {
660- ti << convertToXML (term.word );
660+ ti << convertToJSString ( convertToXML (term.word ), true , true );
661661 }
662662 ti << " ',[" ;
663663 childCount=0 ;
@@ -671,12 +671,12 @@ static void writeJavasScriptSearchDataPage(const QCString &baseName,const QCStri
671671 QCString fn = d ? d->getOutputFileBase () : si ? si->fileName () : QCString ();
672672 QCString ref = d ? d->getReference () : si ? si->ref () : QCString ();
673673 addHtmlExtensionIfMissing (fn);
674- ti << " ' " << externalRef (" ../" ,ref,TRUE ) << fn;
674+ QCString extRef = externalRef (" ../" ,ref,true )+ fn;
675675 if (!anchor.isEmpty ())
676676 {
677- ti << " #" << anchor;
677+ extRef+= " #" + anchor;
678678 }
679- ti << " '," ;
679+ ti << " '" << convertToJSString (extRef, true , true ) << " ' ," ;
680680
681681 bool extLinksInWindow = Config_getBool (EXT_LINKS_IN_WINDOW);
682682 if (!extLinksInWindow || ref.isEmpty ())
@@ -692,15 +692,15 @@ static void writeJavasScriptSearchDataPage(const QCString &baseName,const QCStri
692692 {
693693 if (d && d->getOuterScope ()!=Doxygen::globalScope)
694694 {
695- ti << " '" << convertToXML (d->getOuterScope ()->name ()) << " '" ;
695+ ti << " '" << convertToJSString ( convertToXML (d->getOuterScope ()->name ()), true , true ) << " '" ;
696696 }
697697 else if (md)
698698 {
699699 const FileDef *fd = md->getBodyDef ();
700700 if (fd==nullptr ) fd = md->getFileDef ();
701701 if (fd)
702702 {
703- ti << " '" << convertToXML (fd->localName ()) << " '" ;
703+ ti << " '" << convertToJSString ( convertToXML (fd->localName ()), true , true ) << " '" ;
704704 }
705705 }
706706 else
@@ -754,7 +754,6 @@ static void writeJavasScriptSearchDataPage(const QCString &baseName,const QCStri
754754 {
755755 SrcLangExt lang = md->getLanguage ();
756756 QCString sep = getLanguageSpecificSeparator (lang);
757- if (sep == " \\ " ) sep = " \\\\ " ;
758757 name = convertToXML (d->getOuterScope ()->qualifiedName ()) + sep + prefix;
759758 found = true ;
760759 }
@@ -777,7 +776,7 @@ static void writeJavasScriptSearchDataPage(const QCString &baseName,const QCStri
777776 name = prefix + " (" +theTranslator->trGlobalNamespace ()+" )" ;
778777 }
779778
780- ti << " '" << name << " '" ;
779+ ti << " '" << convertToJSString ( name, true , true ) << " '" ;
781780
782781 prevScope = scope;
783782 childCount++;
0 commit comments