Skip to content

Commit

Permalink
Fix lochmueller#18 - Fix labels and set default format in PHP to 0, s…
Browse files Browse the repository at this point in the history
…o there is no HTML format, if the configuration is missing
  • Loading branch information
lochmueller committed Jun 15, 2017
1 parent cc5fd13 commit 2d9f273
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Classes/Service/CleanHtmlService.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CleanHtmlService implements SingletonInterface
*
* @var integer
*/
protected $formatType = 2;
protected $formatType = 0;

/**
* Tab character
Expand Down Expand Up @@ -129,7 +129,7 @@ public function clean(&$html, $config = [])
$html = $manipulation->manipulate($html, $configuration);
}

if ($this->formatType) {
if ($this->formatType > 0) {
$this->formatHtml($html);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TypoScript/constants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sourceopt.removeComments.keep.10 = /^TYPO3SEARCH_/usi
# cat=plugin.sourceopt/typo/70; type=string; label=LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.headerComment
sourceopt.headerComment =

# cat=plugin.sourceopt/typo/75; type=options [LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml0=0,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml1=1,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml2=2,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml3=3,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml4=4,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml5=5]; label=LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml
# cat=plugin.sourceopt/typo/75; type=options [LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml0=0,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml1=1,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml2=2,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml3=3,LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml4=4]; label=LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtml
sourceopt.formatHtml = 4

# cat=plugin.sourceopt/typo/76; type=string; label=LLL:EXT:sourceopt/Resources/Private/Language/locallang.xlf:sourceopt.formatHtmlTabSize
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
developing and checking the code as well as compressing the code that it is faster
transferred to the user agent.</source>
</trans-unit>
<trans-unit id="sourceopt.formatHtml0" xml:space="preserve">
<source>Disable</source>
</trans-unit>
<trans-unit id="sourceopt.formatHtml1" xml:space="preserve">
<source>No line break at all (code in one line)</source>
</trans-unit>
Expand Down

0 comments on commit 2d9f273

Please sign in to comment.