User tests: Successful: Unsuccessful:
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
?
|
I have tested this item
Simple cosmetic change to align the <meta charset="utf-8" />
with other meta in source
I have tested this item
It assumes that is always correct intended.
Labels |
Removed:
?
|
Status | Pending | ⇒ | Ready to Commit |
RTC
Milestone |
Added: |
That is actually the wrong place as it only works for HTML5 templates. If isHtml5 is false, the double tab will still appear.
The real question is where the double tab is being generated, and the answer is simple: In the template is an initial tab:
https://github.com/joomla/joomla-cms/blob/staging/templates/protostar/index.php#L130
So you either trim the tab from the buffer before returning/echoing it or you remove the tab in the template.
Status | Ready to Commit | ⇒ | Pending |
Labels |
Labels |
Milestone |
Removed: |
But the code says this is only for html5
You'd have to ltrim()
the tab off when returning the contents. If you're not in HTML5 mode, then whatever your first tag is will still have a tab, and we really don't need to litter the method with a $isFirst
variable to decide whether to include the tab on stuff.
if you are going to that, please do it for all templates, including installation
If you return ltrim($buffer, $tab);
at the end of JDocumentRendererHtmlHead::fetchHead()
that does fix it for all templates, instead of this specific fix which only works correctly if the template's in HTML5 mode.
Ok, updated the code.
Works fine now.
Next ocd todo: order by type
Can we go back to RTC?
Can we go back to RTC?
Without any tests?
I saw your "Approval". Then let's go with tests
Ah, that's just the new "Review" feature from GitHub
I would just do trim($buffer);
then all the blancks and new lines are gone, or is this too radical?
We're spitting back a "formatted" HTML string, so doing that would break all of that formatting. Great if you're trying to compress the size of your HTML response but IMO not appropriate as a default behavior.
trim would only remove whitespace from the beginning and end of the string. But since we know for sure there is only the tab in front of it, there is no reason to let trim look for other cases as well. It's just added work for trim without added value
@Bakual trim does also remove tabs and new lines without a second argument http://php.net/manual/en/function.trim.php
We don't want to be trimming the ending line break from the end of the processed head, so what this patch is doing now is just fine.
ok,then we can merge this one
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-11-18 20:38:20 |
Closed_By | ⇒ | rdeutz |
Please add more information to your issue. Without test instructions and/or any description we will close this issue within 4 weeks. Thanks.
This is an automated message from the J!Tracker Application.