gjb2048 / moodle-theme_essential

The Essential Moodle Theme
https://gjb2048.github.io/moodle-theme_essential/
GNU General Public License v3.0
91 stars 120 forks source link

Site summary in the header: element div not allowed as child of element h2 in this context. #819

Closed nidamanx closed 7 years ago

nidamanx commented 7 years ago

Hi, I found something we could fix

----------------------- classes/output/core_renderer.php -----------------------
index e9a4a0d..efc072e 100644
@@ -2240 +2240 @@ class core_renderer extends \core_renderer {
-                    $title .= '<h2 id="subtitle">'.format_text($SITE->summary).'</h2>';
+                    $title .= '<h2 id="subtitle">'.format_string($SITE->summary).'</h2>';
@@ -2245 +2245 @@ class core_renderer extends \core_renderer {
-                    $title .= '<h2 id="subtitle">'.format_text($SITE->summary).'</h2>';
+                    $title .= '<h2 id="subtitle">'.format_string($SITE->summary).'</h2>';

http://w3c.github.io/html/single-page.html#the-div-element

gjb2048 commented 7 years ago

Hi Davide,

Please explain why the solution is correct.

G

gjb2048 commented 7 years ago

Related to #702.

gjb2048 commented 7 years ago

Don't worry, worked it out for myself.

gjb2048 commented 7 years ago

Test data in site summary:

<p><span lang="en" class="multilang">M3.2 dev site - EN</span><span lang="fr" class="multilang">M3.2 dev site - FR</span></p>
nidamanx commented 7 years ago

So, Gareth, do you need more infos or the fix is right also in your side?

gjb2048 commented 7 years ago

No thanks Davide.