Commit cfc5b0da authored by gisle's avatar gisle
Browse files

Output READMEs as plain text

parent cbd36631
......@@ -633,7 +633,8 @@ function advanced_help_view_topic($module, $topic, $popup = FALSE) {
$output = file_get_contents($file);
if (isset($info['readme file']) && $info['readme file']) {
// Readme files are treated as plain text: filter accordingly.
$output = check_plain($output);
$output = '<div class="advanced-help-topic"><pre class="readme">' . check_plain($output) . '</pre></div>';
return $output;
}
// Make some exchanges. The strtr is because url() translates $ into %24
......@@ -735,6 +736,7 @@ function advanced_help_view_topic($module, $topic, $popup = FALSE) {
$output = '<div class="advanced-help-topic">' . $output . '</div>';
drupal_alter('advanced_help_topic', $output, $popup);
return $output;
}
}
......
.advanced-help-topic pre {
background: #f1f1f1;
border: 1px solid #ccc;
......@@ -7,6 +6,13 @@
padding: .4em;
}
.advanced-help-topic pre.readme {
background: white;
border: none;
margin: 0em;
padding: .4em;
}
.advanced-help-topic h3,
.advanced-help-topic h4,
.advanced-help-topic h5,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment