Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
294
Merge Requests
294
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
f40d35e9
Commit
f40d35e9
authored
Sep 04, 2015
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2400407
by hussainweb: Update masterminds/html5 to latest release
parent
66b964dd
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
225 additions
and
118 deletions
+225
-118
core/composer.lock
core/composer.lock
+5
-5
core/vendor/composer/ClassLoader.php
core/vendor/composer/ClassLoader.php
+4
-4
core/vendor/composer/include_paths.php
core/vendor/composer/include_paths.php
+0
-10
core/vendor/composer/installed.json
core/vendor/composer/installed.json
+67
-67
core/vendor/masterminds/html5/.travis.yml
core/vendor/masterminds/html5/.travis.yml
+2
-1
core/vendor/masterminds/html5/CREDITS
core/vendor/masterminds/html5/CREDITS
+1
-1
core/vendor/masterminds/html5/LICENSE.txt
core/vendor/masterminds/html5/LICENSE.txt
+4
-4
core/vendor/masterminds/html5/README.md
core/vendor/masterminds/html5/README.md
+8
-8
core/vendor/masterminds/html5/RELEASE.md
core/vendor/masterminds/html5/RELEASE.md
+6
-0
core/vendor/masterminds/html5/UPGRADING.md
core/vendor/masterminds/html5/UPGRADING.md
+5
-5
core/vendor/masterminds/html5/phpunit.xml.dist
core/vendor/masterminds/html5/phpunit.xml.dist
+1
-1
core/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
core/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
+7
-1
core/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php
...or/masterminds/html5/src/HTML5/Serializer/OutputRules.php
+77
-8
core/vendor/masterminds/html5/test/HTML5/Html5Test.php
core/vendor/masterminds/html5/test/HTML5/Html5Test.php
+3
-0
core/vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php
...asterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php
+1
-1
core/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php
...dor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php
+26
-0
core/vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php
...sterminds/html5/test/HTML5/Serializer/OutputRulesTest.php
+8
-2
No files found.
core/composer.lock
View file @
f40d35e9
...
...
@@ -957,16 +957,16 @@
},
{
"name": "masterminds/html5",
"version": "2.1.
0
",
"version": "2.1.
2
",
"source": {
"type": "git",
"url": "https://github.com/Masterminds/html5-php.git",
"reference": "
a10f8d392e1aad0b500f7b440c8f0d3bc918970
4"
"reference": "
8f782e0f01a6e33a319bdc8f6de9cfd6569979a
4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/
a10f8d392e1aad0b500f7b440c8f0d3bc918970
4",
"reference": "
a10f8d392e1aad0b500f7b440c8f0d3bc918970
4",
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/
8f782e0f01a6e33a319bdc8f6de9cfd6569979a
4",
"reference": "
8f782e0f01a6e33a319bdc8f6de9cfd6569979a
4",
"shasum": ""
},
"require": {
...
...
@@ -1018,7 +1018,7 @@
"serializer",
"xml"
],
"time": "2015-0
2-09 16:26:00
"
"time": "2015-0
6-07 08:43:18
"
},
{
"name": "mikey179/vfsStream",
...
...
core/vendor/composer/ClassLoader.php
View file @
f40d35e9
...
...
@@ -351,7 +351,7 @@ private function findFileWithExtension($class, $ext)
foreach
(
$this
->
prefixLengthsPsr4
[
$first
]
as
$prefix
=>
$length
)
{
if
(
0
===
strpos
(
$class
,
$prefix
))
{
foreach
(
$this
->
prefixDirsPsr4
[
$prefix
]
as
$dir
)
{
if
(
is_file
(
$file
=
$dir
.
DIRECTORY_SEPARATOR
.
substr
(
$logicalPathPsr4
,
$length
)))
{
if
(
file_exists
(
$file
=
$dir
.
DIRECTORY_SEPARATOR
.
substr
(
$logicalPathPsr4
,
$length
)))
{
return
$file
;
}
}
...
...
@@ -361,7 +361,7 @@ private function findFileWithExtension($class, $ext)
// PSR-4 fallback dirs
foreach
(
$this
->
fallbackDirsPsr4
as
$dir
)
{
if
(
is_file
(
$file
=
$dir
.
DIRECTORY_SEPARATOR
.
$logicalPathPsr4
))
{
if
(
file_exists
(
$file
=
$dir
.
DIRECTORY_SEPARATOR
.
$logicalPathPsr4
))
{
return
$file
;
}
}
...
...
@@ -380,7 +380,7 @@ private function findFileWithExtension($class, $ext)
foreach
(
$this
->
prefixesPsr0
[
$first
]
as
$prefix
=>
$dirs
)
{
if
(
0
===
strpos
(
$class
,
$prefix
))
{
foreach
(
$dirs
as
$dir
)
{
if
(
is_file
(
$file
=
$dir
.
DIRECTORY_SEPARATOR
.
$logicalPathPsr0
))
{
if
(
file_exists
(
$file
=
$dir
.
DIRECTORY_SEPARATOR
.
$logicalPathPsr0
))
{
return
$file
;
}
}
...
...
@@ -390,7 +390,7 @@ private function findFileWithExtension($class, $ext)
// PSR-0 fallback dirs
foreach
(
$this
->
fallbackDirsPsr0
as
$dir
)
{
if
(
is_file
(
$file
=
$dir
.
DIRECTORY_SEPARATOR
.
$logicalPathPsr0
))
{
if
(
file_exists
(
$file
=
$dir
.
DIRECTORY_SEPARATOR
.
$logicalPathPsr0
))
{
return
$file
;
}
}
...
...
core/vendor/composer/include_paths.php
deleted
100644 → 0
View file @
66b964dd
<?php
// include_paths.php @generated by Composer
$vendorDir
=
dirname
(
dirname
(
__FILE__
));
$baseDir
=
dirname
(
$vendorDir
);
return
array
(
$vendorDir
.
'/phpunit/php-text-template'
,
);
core/vendor/composer/installed.json
View file @
f40d35e9
...
...
@@ -265,73 +265,6 @@
"testing"
]
},
{
"name"
:
"masterminds/html5"
,
"version"
:
"2.1.0"
,
"version_normalized"
:
"2.1.0.0"
,
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/Masterminds/html5-php.git"
,
"reference"
:
"a10f8d392e1aad0b500f7b440c8f0d3bc9189704"
},
"dist"
:
{
"type"
:
"zip"
,
"url"
:
"https://api.github.com/repos/Masterminds/html5-php/zipball/a10f8d392e1aad0b500f7b440c8f0d3bc9189704"
,
"reference"
:
"a10f8d392e1aad0b500f7b440c8f0d3bc9189704"
,
"shasum"
:
""
},
"require"
:
{
"ext-libxml"
:
"*"
,
"php"
:
">=5.3.0"
},
"require-dev"
:
{
"phpunit/phpunit"
:
"4.*"
,
"sami/sami"
:
"~2.0"
,
"satooshi/php-coveralls"
:
"0.6.*"
},
"time"
:
"2015-02-09 16:26:00"
,
"type"
:
"library"
,
"extra"
:
{
"branch-alias"
:
{
"dev-master"
:
"2.1-dev"
}
},
"installation-source"
:
"dist"
,
"autoload"
:
{
"psr-4"
:
{
"Masterminds\\"
:
"src"
}
},
"notification-url"
:
"https://packagist.org/downloads/"
,
"license"
:
[
"MIT"
],
"authors"
:
[
{
"name"
:
"Matt Butcher"
,
"email"
:
"technosophos@gmail.com"
},
{
"name"
:
"Asmir Mustafic"
,
"email"
:
"goetas@gmail.com"
},
{
"name"
:
"Matt Farina"
,
"email"
:
"matt@mattfarina.com"
}
],
"description"
:
"An HTML5 parser and serializer."
,
"homepage"
:
"http://masterminds.github.io/html5-php"
,
"keywords"
:
[
"HTML5"
,
"dom"
,
"html"
,
"parser"
,
"querypath"
,
"serializer"
,
"xml"
]
},
{
"name"
:
"sebastian/diff"
,
"version"
:
"1.3.0"
,
...
...
@@ -3483,5 +3416,72 @@
"keywords"
:
[
"stack"
]
},
{
"name"
:
"masterminds/html5"
,
"version"
:
"2.1.2"
,
"version_normalized"
:
"2.1.2.0"
,
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/Masterminds/html5-php.git"
,
"reference"
:
"8f782e0f01a6e33a319bdc8f6de9cfd6569979a4"
},
"dist"
:
{
"type"
:
"zip"
,
"url"
:
"https://api.github.com/repos/Masterminds/html5-php/zipball/8f782e0f01a6e33a319bdc8f6de9cfd6569979a4"
,
"reference"
:
"8f782e0f01a6e33a319bdc8f6de9cfd6569979a4"
,
"shasum"
:
""
},
"require"
:
{
"ext-libxml"
:
"*"
,
"php"
:
">=5.3.0"
},
"require-dev"
:
{
"phpunit/phpunit"
:
"4.*"
,
"sami/sami"
:
"~2.0"
,
"satooshi/php-coveralls"
:
"0.6.*"
},
"time"
:
"2015-06-07 08:43:18"
,
"type"
:
"library"
,
"extra"
:
{
"branch-alias"
:
{
"dev-master"
:
"2.1-dev"
}
},
"installation-source"
:
"dist"
,
"autoload"
:
{
"psr-4"
:
{
"Masterminds\\"
:
"src"
}
},
"notification-url"
:
"https://packagist.org/downloads/"
,
"license"
:
[
"MIT"
],
"authors"
:
[
{
"name"
:
"Matt Butcher"
,
"email"
:
"technosophos@gmail.com"
},
{
"name"
:
"Asmir Mustafic"
,
"email"
:
"goetas@gmail.com"
},
{
"name"
:
"Matt Farina"
,
"email"
:
"matt@mattfarina.com"
}
],
"description"
:
"An HTML5 parser and serializer."
,
"homepage"
:
"http://masterminds.github.io/html5-php"
,
"keywords"
:
[
"HTML5"
,
"dom"
,
"html"
,
"parser"
,
"querypath"
,
"serializer"
,
"xml"
]
}
]
core/vendor/masterminds/html5/.travis.yml
View file @
f40d35e9
...
...
@@ -12,13 +12,14 @@ php:
-
5.5
-
5.6
-
hhvm
-
nightly
notifications
:
irc
:
"
irc.freenode.net#masterminds"
before_script
:
-
composer self-update
-
composer install
--dev
-
composer install
script
:
-
mkdir -p build/logs
...
...
core/vendor/masterminds/html5/CREDITS
View file @
f40d35e9
...
...
@@ -7,5 +7,5 @@ Kukhar Vasily [ngreduce] <ngreduce@gmail.com> (contributor)
Rune Christensen [MrElectronic] <mrelectronic@example.com> (contributor)
Mišo Belica [miso-belica] <miso-belica@example.com> (contributor)
Asmir Mustafic [goetas] <goetas@example.com> (contributor)
KITAITI Makoto [KitaitiMakoto] <KitaitiMakoto@example.com> (contributor)
KITAITI Makoto [KitaitiMakoto] <KitaitiMakoto@example.com> (contributor)
Jacob Floyd [cognifloyd] <cognifloyd@gmail.com> (contributor)
core/vendor/masterminds/html5/LICENSE.txt
View file @
f40d35e9
...
...
@@ -7,8 +7,8 @@ Matt Farina - matt@mattfarina.com
Asmir Mustafic - goetas@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
...
...
@@ -49,8 +49,8 @@ The Mozilla Foundation (contributions from Henri Sivonen since 2008)
David Flanagan (Mozilla) - dflanagan@mozilla.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
...
...
core/vendor/masterminds/html5/README.md
View file @
f40d35e9
...
...
@@ -36,7 +36,7 @@ install.
## Basic Usage
HTML5-PHP has a high-level API and a low-level API.
HTML5-PHP has a high-level API and a low-level API.
Here is how you use the high-level
`HTML5`
library API:
...
...
@@ -101,7 +101,7 @@ The following options are supported:
*
`disable_html_ns`
(boolean): Prevents the parser from automatically
assigning the HTML5 namespace to the DOM document. This is for
non-namespace aware DOM tools.
*
`target_doc`
(
\D
OMDocument): A DOM document that will be used as the
*
`target_doc
ument
`
(
\D
OMDocument): A DOM document that will be used as the
destination for the parsed nodes.
*
`implicit_namespaces`
(array): An assoc array of namespaces that should be
used by the parser. Name is tag prefix, value is NS URI.
...
...
@@ -144,14 +144,14 @@ The serializer is broken into three parts:
-
The
`OutputRules`
contain the rules to turn DOM elements into strings. The
rules are an implementation of the interface
`RulesInterface`
allowing for
different rule sets to be used.
different rule sets to be used.
-
The
`Traverser`
, which is a special-purpose tree walker. It visits
each node node in the tree and uses the
`OutputRules`
to transform the node
into a string.
-
`HTML5`
manages the
`Traverser`
and stores the resultant data
in the correct place.
The serializer (
`save()`
,
`saveHTML()`
) follows the
The serializer (
`save()`
,
`saveHTML()`
) follows the
[
section 8.9 of the HTML 5.0 spec
](
http://www.w3.org/TR/2012/CR-html5-20121217/syntax.html#serializing-html-fragments
)
.
So tags are serialized according to these rules:
...
...
@@ -166,8 +166,8 @@ issues known issues that are not presently on the roadmap:
-
Namespaces: HTML5 only
[
supports a selected list of namespaces
](
http://www.w3.org/TR/html5/infrastructure.html#namespaces
)
and they do not operate in the same way as XML namespaces. A
`:`
has no special
meaning.
By default the parser does not support XML style namespaces via
`:`
;
meaning.
By default the parser does not support XML style namespaces via
`:`
;
to enable the XML namespaces see the
[
XML Namespaces section
](
#xml-namespaces
)
-
Scripts: This parser does not contain a JavaScript or a CSS
interpreter. While one may be supplied, not all features will be
...
...
@@ -184,13 +184,13 @@ issues known issues that are not presently on the roadmap:
*
Per the spec, many legacy tags are admitted and correctly handled,
even though they are technically not part of HTML5.
-
Attribute names and values: Due to the implementation details of the
PHP implementation of DOM, attribute names that do not follow the
PHP implementation of DOM, attribute names that do not follow the
XML 1.0 standard are not inserted into the DOM. (Effectively, they
are ignored.) If you've got a clever fix for this, jump in!
-
Processor Instructions: The HTML5 spec does not allow processor
instructions. We do. Since this is a server-side library, we think
this is useful. And that means, dear reader, that in some cases you
can parse the HTML from a mixed PHP/HTML document. This, however,
can parse the HTML from a mixed PHP/HTML document. This, however,
is an incidental feature, not a core feature.
-
HTML manifests: Unsupported.
-
PLAINTEXT: Unsupported.
...
...
core/vendor/masterminds/html5/RELEASE.md
View file @
f40d35e9
# Release Notes
2.
1.2 (2015-06-07)
-
#82: Support for PHP7
-
#84: Improved boolean attribute handling
2.
1.1 (2015-03-23)
-
#78: Fixes bug where unmatched entity like string drops everything after &.
2.
1.0 (2015-02-01)
-
#74: Added
`disable_html_ns`
and
`target_doc`
dom parsing options
...
...
core/vendor/masterminds/html5/UPGRADING.md
View file @
f40d35e9
...
...
@@ -2,19 +2,19 @@ From 1.x to 2.x
=================
-
All classes uses
`Masterminds`
namespace.
-
All public static methods has been removed from
`HTML5`
class and the general API to access the HTML5 functionalities has changed.
-
All public static methods has been removed from
`HTML5`
class and the general API to access the HTML5 functionalities has changed.
Before:
$dom = \HTML5::loadHTML('<html>....');
\HTML5::saveHTML($dom);
After:
use Masterminds\HTML5;
$html5 = new HTML5();
$dom = $html5->loadHTML('<html>....');
echo $html5->saveHTML($dom);
...
...
core/vendor/masterminds/html5/phpunit.xml.dist
View file @
f40d35e9
...
...
@@ -11,7 +11,7 @@
<file>
src/HTML5/Parser/InputStream.php
</file>
<file>
src/HTML5/Serializer/RulesInterface.php
</file>
<file>
src/HTML5/Entities.php
</file>
<file>
src/HTML5/Serializer/HTML5Entities.php
</file>
<file>
src/HTML5/Serializer/HTML5Entities.php
</file>
</blacklist>
</filter>
<logging>
...
...
core/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
View file @
f40d35e9
...
...
@@ -1065,8 +1065,14 @@ protected function decodeCharacterReference($inAttribute = false)
// [a-zA-Z0-9]+;
$cname
=
$this
->
scanner
->
getAsciiAlpha
();
$entity
=
CharacterReference
::
lookupName
(
$cname
);
// When no entity is found provide the name of the unmatched string
// and continue on as the & is not part of an entity. The & will
// be converted to & elsewhere.
if
(
$entity
==
null
)
{
$this
->
parseError
(
"No match in entity table for '%s'"
,
$entity
);
$this
->
parseError
(
"No match in entity table for '%s'"
,
$cname
);
$this
->
scanner
->
unconsume
(
$this
->
scanner
->
position
()
-
$start
);
return
'&'
;
}
}
...
...
core/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php
View file @
f40d35e9
...
...
@@ -73,17 +73,86 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface
'nodeName'=>'img', 'nodeName'=>array('img', 'a'),
'attrName'=>'alt', 'attrName'=>array('title', 'alt'),
'prefixes'=>['xh'=>'http://www.w3.org/1999/xhtml'),
'xpath' => "@checked[../../xh:input[@type='radio' or @type='checkbox']]",
),
*/
array
(
'nodeNamespace'
=>
'http://www.w3.org/1999/xhtml'
,
'attrName'
=>
array
(
'alt'
,
'title'
),
'nodeNamespace'
=>
'http://www.w3.org/1999/xhtml'
,
'attrName'
=>
array
(
'href'
,
'hreflang'
,
'http-equiv'
,
'icon'
,
'id'
,
'keytype'
,
'kind'
,
'label'
,
'lang'
,
'language'
,
'list'
,
'maxlength'
,
'media'
,
'method'
,
'name'
,
'placeholder'
,
'rel'
,
'rows'
,
'rowspan'
,
'sandbox'
,
'spellcheck'
,
'scope'
,
'seamless'
,
'shape'
,
'size'
,
'sizes'
,
'span'
,
'src'
,
'srcdoc'
,
'srclang'
,
'srcset'
,
'start'
,
'step'
,
'style'
,
'summary'
,
'tabindex'
,
'target'
,
'title'
,
'type'
,
'value'
,
'width'
,
'border'
,
'charset'
,
'cite'
,
'class'
,
'code'
,
'codebase'
,
'color'
,
'cols'
,
'colspan'
,
'content'
,
'coords'
,
'data'
,
'datetime'
,
'default'
,
'dir'
,
'dirname'
,
'enctype'
,
'for'
,
'form'
,
'formaction'
,
'headers'
,
'height'
,
'accept'
,
'accept-charset'
,
'accesskey'
,
'action'
,
'align'
,
'alt'
,
'bgcolor'
,
),
),
array
(
'nodeNamespace'
=>
'http://www.w3.org/1999/xhtml'
,
'xpath'
=>
'starts-with(local-name(), \'data-\')'
,
),
);
const
DOCTYPE
=
'<!DOCTYPE html>'
;
...
...
@@ -328,7 +397,7 @@ protected function nonBooleanAttribute(\DOMAttr $attr)
$xp
->
registerNamespace
(
$nsPrefix
,
$ns
);
}
}
if
(
!
$xp
->
query
(
$rule
[
'xpath'
],
$attr
->
ownerElement
)
->
length
){
if
(
!
$xp
->
evaluate
(
$rule
[
'xpath'
],
$attr
)
){
continue
;
}
}
...
...
core/vendor/masterminds/html5/test/HTML5/Html5Test.php
View file @
f40d35e9
...
...
@@ -376,6 +376,9 @@ public function testEntities()
$res
=
$this
->
cycleFragment
(
'<a>Apples & bananas.</a>'
);
$this
->
assertRegExp
(
'|Apples & bananas.|'
,
$res
);
$res
=
$this
->
cycleFragment
(
'<p>R&D</p>'
);
$this
->
assertRegExp
(
'|R&D|'
,
$res
);
}
public
function
testComment
()
...
...
core/vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php
View file @
f40d35e9
...
...
@@ -100,7 +100,7 @@ public function testDocumentWithATargetDocument()
$this
->
assertSame
(
$doc
,
$targetDom
);
$this
->
assertEquals
(
'html'
,
$doc
->
documentElement
->
tagName
);
}
public
function
testDocumentFakeAttrAbsence
()
{
$html
=
"<!DOCTYPE html><html xmlns=
\"
http://www.w3.org/1999/xhtml
\"
><body>foo</body></html>"
;
...
...
core/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php
0 → 100644
View file @
f40d35e9
<?php
namespace
Masterminds\HTML5\Tests\Parser
;
use
Masterminds\HTML5\Parser\UTF8Utils
;
class
UTF8UtilsTest
extends
\
Masterminds\HTML5\Tests\TestCase
{
public
function
testConvertToUTF8
()
{
$out
=
UTF8Utils
::
convertToUTF8
(
'éàa'
,
'ISO-8859-1'
);
$this
->
assertEquals
(
'éà a'
,
$out
);
}
/**
* @todo add tests for invalid codepoints
*/
public
function
testCheckForIllegalCodepoints
()
{
$smoke
=
"Smoke test"
;
$err
=
UTF8Utils
::
checkForIllegalCodepoints
(
$smoke
);
$this
->
assertEmpty
(
$err
);
$data
=
"Foo Bar
\0
Baz"
;
$errors
=
UTF8Utils
::
checkForIllegalCodepoints
(
$data
);
$this
->
assertContains
(
'null-character'
,
$errors
);
}
}
\ No newline at end of file
core/vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php
View file @
f40d35e9
...
...
@@ -460,8 +460,10 @@ public function booleanAttributes()
array
(
'<input type="radio" readonly>'
),
array
(
'<input type="radio" checked disabled>'
),
array
(
'<input type="checkbox" checked disabled>'
),
array
(
'<input type="radio" value="" checked disabled>'
),
array
(
'<div data-value=""></div>'
),
array
(
'<select disabled></select>'
),
array
(
'<div ng-app>
foo
</div>'
),
array
(
'<div ng-app></div>'
),
array
(
'<script defer></script>'
),
);
}
...
...
@@ -482,7 +484,11 @@ public function testBooleanAttrs($html)
$m
->
invoke
(
$r
,
$node
);
$content
=
stream_get_contents
(
$stream
,
-
1
,
0
);
$this
->
assertContains
(
$content
,
$html
);
$html
=
preg_replace
(
'~<[a-z]+(.*)></[a-z]+>~'
,
'\1'
,
$html
);
$html
=
preg_replace
(
'~<[a-z]+(.*)/?>~'
,
'\1'
,
$html
);
$this
->
assertEquals
(
$content
,
$html
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment