Skip to content

Commit

Permalink
Switch to JSON_PRETTY_PRINT flag in renderer [iet:9499314]
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Jul 15, 2017
1 parent 0402ef4 commit 76436d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/views/oembed/_generic_iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

$html = <<<EOF
<div class='$meta->class_name generic-iframe embed-rsp'>
<iframe role='document' allowfullscreen mozallowfullscreen webkitallowfullscreen title='$iframe_label'
<iframe role='document' allowfullscreen title='$iframe_label'
width='$meta->width' height='$meta->height' frameborder='0'
src='$meta->embed_url'
></iframe>
Expand Down
8 changes: 4 additions & 4 deletions src/views/oembed/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
$oembed['html'] = str_replace(array(' ', "\r", "\n"), array(' ', ''), $oembed['html']);
}

$json = json_encode($oembed);
$json = str_replace('"dc:', '"dc$', $json); //XML namespaces - check Gdata.
$json = str_replace(',"', ','.PHP_EOL.'"', $json);
$json = json_encode($oembed, JSON_PRETTY_PRINT);
$json = str_replace('"dc:', '"dc$', $json); // XML namespaces - check Gdata.
// $json = str_replace(',"', ','.PHP_EOL.'"', $json);
//Pretty-print?
if ($callback) {
$json = "$callback($json)";
Expand All @@ -50,4 +50,4 @@ function _xml_element($obj) {
<?php endforeach;*/ ?>
</oembed>
<?php
endif;
endif;

0 comments on commit 76436d5

Please sign in to comment.