| @@ -84,10 +84,15 @@ | ||
| 84 | 84 | } elseif (isset($d['base'])) { |
| 85 | 85 | $result = $d['base']; |
| 86 | 86 | } |
| 87 | 87 | if (isset($d['append'])) { |
| 88 | - $result .= $d['append']; | |
| 88 | + if (!isset($d['excludeAppend']) || !\in_array($parentName, $d['excludeAppend'])) { | |
| 89 | + $result .= $d['append']; | |
| 90 | + } | |
| 89 | 91 | } |
| 92 | + if (isset($d['appendOnly']) && \in_array($parentName, $d['appendOnly']['shapes'])) { | |
| 93 | + $result .= $d['appendOnly']['message']; | |
| 94 | + } | |
| 90 | 95 | return $this->clean($result); |
| 91 | 96 | } |
| 92 | 97 | private function clean($content) |
| 93 | 98 | { |
| @@ -94,9 +99,9 @@ | ||
| 94 | 99 | if (!$content) { |
| 95 | 100 | return ''; |
| 96 | 101 | } |
| 97 | 102 | $tidy = new \tidy(); |
| 98 | - $tidy->parseString($content, ['indent' => \true, 'doctype' => 'omit', 'output-html' => \true, 'show-body-only' => \true, 'drop-empty-paras' => \true, 'drop-font-tags' => \true, 'drop-proprietary-attributes' => \true, 'hide-comments' => \true, 'logical-emphasis' => \true]); | |
| 103 | + $tidy->parseString($content, ['indent' => \true, 'doctype' => 'omit', 'output-html' => \true, 'show-body-only' => \true, 'drop-empty-paras' => \true, 'clean' => \true, 'drop-proprietary-attributes' => \true, 'hide-comments' => \true, 'logical-emphasis' => \true]); | |
| 99 | 104 | $tidy->cleanRepair(); |
| 100 | 105 | return (string) $content; |
| 101 | 106 | } |
| 102 | 107 | } |