Jump to content

Topic on Extension talk:Tabs

LarryAlgo (talkcontribs)
diff --git a/Tabs.body.php b/Tabs.body.php
index 16d12b4..1c30aa9 100644
--- a/Tabs.body.php
+++ b/Tabs.body.php
@@ -398,7 +398,7 @@ class Tabs {
                                '.tabs-dropdown li,'.
                                '.tabs-dropdown ul,'.
                                '.tabs-dropdown ol {'.
-                                       'background-color: '.wfMessage('tabs-dropdown-bgcolor').
+                                       'background-color: '.wfMessage('tabs-dropdown-bgcolor')->text().
                                '}';
                return "<style type=\"text/css\" id=\"tabs-dynamic-styles\">/*<![CDATA[*/\n/* Dynamically generated tabs styles */\n$css\n/*]]>*/</style>";
        }

Found this was interfering with math tags on my page, and dug it down to this. I am not familiar with innards, but this fixed it for me.

~~~~

LarryAlgo (talkcontribs)

Also just to add that I ran into this again, this time with bisecting it to this change:

--- a/Tabs.body.php
+++ b/Tabs.body.php
@@ -92,7 +92,7 @@ class Tabs {
                        if (isset($names[$index-1])) { // if array $names already has a name defined at position $index, use that.
                                $name = $names[$index-1]; // minus 1 because tabs are 1-based, arrays 0-based.
                        } else { // otherwise, use the entered name, or the $index with a "Tab " prefix if it is not defined or empty.
-                               $name = trim(isset($attr['name']) && $attr['name'] ? $attr['name'] : wfMessage('tabs-tab-label', $index));
+                               $name = trim(isset($attr['name']) && $attr['name'] ? $attr['name'] : wfMessage('tabs-tab-label', $index)->text());
                        }
                }
                if (!$nested && !$nestAttr) { // This runs when the tab is not nested inside a <tabs> tag.

I also noticed the pattern and went ahead and changed found all my "wfMessage" and added ->text(). I'm still an amateur to mediawiki.. I can sent a patch when I'm in an easier place to do so.

Reply to "Minor bug?"