Merge "Fix param type of search terms in search related classes"
[lhc/web/wiklou.git] / includes / content / WikiTextStructure.php
index a82ffa1..2f3a6f6 100644 (file)
@@ -31,9 +31,9 @@ class WikiTextStructure {
                'audio', 'video',
                // CSS stylesheets aren't content
                'style',
-               // The [1] for references
+               // The [1] for references from Cite
                'sup.reference',
-               // The ↑ next to references in the references section
+               // The ↑ next to references in the references section from Cite
                '.mw-cite-backlink',
                // Headings are already indexed in their own field.
                'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
@@ -41,7 +41,9 @@ class WikiTextStructure {
                '.autocollapse',
                // Content explicitly decided to be not searchable by editors such
                // as custom navigation templates.
-               '.navigation-not-searchable'
+               '.navigation-not-searchable',
+               // User-facing interface code prompting the user to act from WikibaseMediaInfo
+               '.wbmi-entityview-emptyCaption',
        ];
 
        /**
@@ -152,7 +154,7 @@ class WikiTextStructure {
                        'enableSectionEditTokens' => false,
                        'allowTOC' => false,
                ] );
-               if ( strlen( $text ) == 0 ) {
+               if ( $text === '' ) {
                        $this->allText = "";
                        // empty text - nothing to seek here
                        return;