|
@@ 157-161 (lines=5) @@
|
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
// remove deprecated anchor-jump |
| 157 |
|
if ($htmlMin->isDoRemoveDeprecatedAnchorName()) { |
| 158 |
|
/** @noinspection NestedPositiveIfStatementsInspection */ |
| 159 |
|
if ($tag === 'a' && $attrName === 'name' && isset($allAttr['id']) && $allAttr['id'] === $attrValue) { |
| 160 |
|
return true; |
| 161 |
|
} |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
// remove "type=text/css" for css links |
|
@@ 165-169 (lines=5) @@
|
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
// remove "type=text/css" for css links |
| 165 |
|
if ($htmlMin->isDoRemoveDeprecatedTypeFromStylesheetLink()) { |
| 166 |
|
/** @noinspection NestedPositiveIfStatementsInspection */ |
| 167 |
|
if ($tag === 'link' && $attrName === 'type' && $attrValue === 'text/css' && isset($allAttr['rel']) && $allAttr['rel'] === 'stylesheet') { |
| 168 |
|
return true; |
| 169 |
|
} |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
// remove deprecated script-mime-types |
|
@@ 173-177 (lines=5) @@
|
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
// remove deprecated script-mime-types |
| 173 |
|
if ($htmlMin->isDoRemoveDeprecatedTypeFromScriptTag()) { |
| 174 |
|
/** @noinspection NestedPositiveIfStatementsInspection */ |
| 175 |
|
if ($tag === 'script' && $attrName === 'type' && isset($allAttr['src'], self::$executableScriptsMimeTypes[$attrValue])) { |
| 176 |
|
return true; |
| 177 |
|
} |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
// remove 'value=""' from <input type="text"> |
|
@@ 181-185 (lines=5) @@
|
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
// remove 'value=""' from <input type="text"> |
| 181 |
|
if ($htmlMin->isDoRemoveValueFromEmptyInput()) { |
| 182 |
|
/** @noinspection NestedPositiveIfStatementsInspection */ |
| 183 |
|
if ($tag === 'input' && $attrName === 'value' && $attrValue === '' && isset($allAttr['type']) && $allAttr['type'] === 'text') { |
| 184 |
|
return true; |
| 185 |
|
} |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
// remove some empty attributes |