Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d6724f5a
Commit
d6724f5a
authored
Feb 08, 2017
by
catch
Browse files
Issue
#1569894
by sun, alexpott: Update unicode.inc to PHP5
parent
e7ebae28
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/includes/unicode.inc
View file @
d6724f5a
...
...
@@ -74,6 +74,11 @@ function unicode_requirements() {
* An XML parser object or FALSE on error.
*
* @ingroup php_wrappers
*
* @deprecated in Drupal 8.3.0 and will bre removed in Drupal 9.0.0. Use
* xml_parser_create() and
* xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, 'utf-8')
* instead.
*/
function
drupal_xml_parser_create
(
&
$data
)
{
// Default XML encoding is UTF-8
...
...
core/modules/aggregator/src/Form/OpmlFeedAdd.php
View file @
d6724f5a
...
...
@@ -190,7 +190,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
*/
protected
function
parseOpml
(
$opml
)
{
$feeds
=
array
();
$xml_parser
=
drupal_xml_parser_create
(
$opml
);
$xml_parser
=
xml_parser_create
();
xml_parser_set_option
(
$xml_parser
,
XML_OPTION_TARGET_ENCODING
,
'utf-8'
);
if
(
xml_parse_into_struct
(
$xml_parser
,
$opml
,
$values
))
{
foreach
(
$values
as
$entry
)
{
if
(
$entry
[
'tag'
]
==
'OUTLINE'
&&
isset
(
$entry
[
'attributes'
]))
{
...
...
core/modules/aggregator/src/Tests/AggregatorTestBase.php
View file @
d6724f5a
...
...
@@ -271,7 +271,8 @@ public function getValidOpml(array $feeds) {
EOF;
$path
=
'public://valid-opml.xml'
;
return
file_unmanaged_save_data
(
$opml
,
$path
);
// Add the UTF-8 byte order mark.
return
file_unmanaged_save_data
(
chr
(
239
)
.
chr
(
187
)
.
chr
(
191
)
.
$opml
,
$path
);
}
/**
...
...
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