Instant Articles for WP - Version 3.3.1

Version Description

Download this release

Release Info

Developer diegoquinteiro
Plugin Icon 128x128 Instant Articles for WP
Version 3.3.1
Comparing to
See all releases

Code changes from version 3.3.0 to 3.3.1

class-instant-articles-post.php CHANGED
@@ -595,6 +595,8 @@ class Instant_Articles_Post {
595
  */
596
  do_action( 'instant_articles_before_transform_post', $this );
597
 
 
 
598
  // Get time zone configured in WordPress. Default to UTC if no time zone configured.
599
  $date_time_zone = get_option( 'timezone_string' ) ? new DateTimeZone( get_option( 'timezone_string' ) ) : new DateTimeZone( 'UTC' );
600
 
@@ -690,6 +692,8 @@ class Instant_Articles_Post {
690
 
691
  $this->instant_article = apply_filters( 'instant_articles_transformed_element', $this->instant_article );
692
 
 
 
693
  /**
694
  * Fires after the instant article is rendered.
695
  *
595
  */
596
  do_action( 'instant_articles_before_transform_post', $this );
597
 
598
+ is_transforming_instant_article( true );
599
+
600
  // Get time zone configured in WordPress. Default to UTC if no time zone configured.
601
  $date_time_zone = get_option( 'timezone_string' ) ? new DateTimeZone( get_option( 'timezone_string' ) ) : new DateTimeZone( 'UTC' );
602
 
692
 
693
  $this->instant_article = apply_filters( 'instant_articles_transformed_element', $this->instant_article );
694
 
695
+ is_transforming_instant_article( false );
696
+
697
  /**
698
  * Fires after the instant article is rendered.
699
  *
class-instant-articles-publisher.php CHANGED
@@ -25,9 +25,10 @@ class Instant_Articles_Publisher {
25
 
26
  /**
27
  * Inits publisher.
 
28
  */
29
  public static function init() {
30
- add_action( 'save_post', array( 'Instant_Articles_Publisher', 'submit_article' ), 10, 2 );
31
  }
32
 
33
  /**
25
 
26
  /**
27
  * Inits publisher.
28
+ * Change by cmjaimet submitted Jan 3, 2016: Delay save_post action hook (3rd param 10 => 999) so that all custom meta data is processed and saved before submission to FBIA
29
  */
30
  public static function init() {
31
+ add_action( 'save_post', array( 'Instant_Articles_Publisher', 'submit_article' ), 999, 2 );
32
  }
33
 
34
  /**
compat/class-instant-articles-jetpack.php CHANGED
@@ -39,6 +39,12 @@ class Instant_Articles_Jetpack {
39
  */
40
  private function _fix_facebook_embed() {
41
 
 
 
 
 
 
 
42
  // All of these are registered in jetpack/modules/shortcodes/facebook.php
43
 
44
  if ( defined( 'JETPACK_FACEBOOK_EMBED_REGEX' ) ) {
@@ -79,7 +85,7 @@ class Instant_Articles_Jetpack {
79
  $locale = 'en_US';
80
  }
81
 
82
- return '<figure class="op-social"><iframe><script src="https://connect.facebook.net/' . $locale . '/sdk.js#xfbml=1&amp;version=v2.6" async></script><div class="fb-post" data-href="' . esc_url( $url ) . '"></div></iframe></figure>';
83
  }
84
 
85
  public static function transformer_loaded( $transformer ) {
39
  */
40
  private function _fix_facebook_embed() {
41
 
42
+ // Don't try to fix facebook embeds unless we're in Instant Articles context.
43
+ // This prevents mangled output on frontend.
44
+ if ( ! is_transforming_instant_article() ) {
45
+ return;
46
+ }
47
+
48
  // All of these are registered in jetpack/modules/shortcodes/facebook.php
49
 
50
  if ( defined( 'JETPACK_FACEBOOK_EMBED_REGEX' ) ) {
85
  $locale = 'en_US';
86
  }
87
 
88
+ return '<figure class="op-interactive"><iframe><script src="https://connect.facebook.net/' . $locale . '/sdk.js#xfbml=1&amp;version=v2.6" async></script><div class="fb-post" data-href="' . esc_url( $url ) . '"></div></iframe></figure>';
89
  }
90
 
91
  public static function transformer_loaded( $transformer ) {
embeds.php CHANGED
@@ -39,8 +39,12 @@ function instant_articles_embed_oembed_html( $html, $url, $attr, $post_id ) {
39
  $provider_name = 'twitter';
40
  } elseif ( false !== strpos( $provider_url, 'youtube.com' ) ) {
41
  $provider_name = 'youtube';
42
- } elseif ( false !== strpos( $provider_url, 'vine.co' ) ) {
 
 
43
  $provider_name = 'vine';
 
 
44
  }
45
 
46
  $provider_name = apply_filters( 'instant_articles_social_embed_type', $provider_name, $url );
@@ -68,6 +72,12 @@ add_filter( 'embed_oembed_html', 'instant_articles_embed_oembed_html', 10, 4 );
68
  */
69
  function instant_articles_embed_get_html( $provider_name, $html, $url, $attr, $post_id ) {
70
 
 
 
 
 
 
 
71
  /**
72
  * Filter the HTML that will go into the Instant Article Social Embed markup.
73
  *
39
  $provider_name = 'twitter';
40
  } elseif ( false !== strpos( $provider_url, 'youtube.com' ) ) {
41
  $provider_name = 'youtube';
42
+ } elseif( false !== strpos( $providerURL, 'vimeo.com' ) ) {
43
+ $provider_name = 'vimeo';
44
+ } elseif( false !== strpos( $providerURL, 'vine.co' ) ) {
45
  $provider_name = 'vine';
46
+ } elseif( false !== strpos( $providerURL, 'facebook.com' ) ) {
47
+ $provider_name = 'facebook';
48
  }
49
 
50
  $provider_name = apply_filters( 'instant_articles_social_embed_type', $provider_name, $url );
72
  */
73
  function instant_articles_embed_get_html( $provider_name, $html, $url, $attr, $post_id ) {
74
 
75
+ // Don't try to fix embeds unless we're in Instant Articles context.
76
+ // This prevents mangled output on frontend.
77
+ if ( ! is_transforming_instant_article() ) {
78
+ return $html;
79
+ }
80
+
81
  /**
82
  * Filter the HTML that will go into the Instant Article Social Embed markup.
83
  *
facebook-instant-articles.php CHANGED
@@ -4,7 +4,7 @@
4
  * Description: Add support for Instant Articles for Facebook to your WordPress site.
5
  * Author: Automattic, Dekode, Facebook
6
  * Author URI: https://vip.wordpress.com/plugins/instant-articles/
7
- * Version: 3.3
8
  * Text Domain: instant-articles
9
  * License: GPLv2
10
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -61,7 +61,7 @@ if ( version_compare( PHP_VERSION, '5.4', '<' ) ) {
61
 
62
  defined( 'ABSPATH' ) || die( 'Shame on you' );
63
 
64
- define( 'IA_PLUGIN_VERSION', '3.3' );
65
  define( 'IA_PLUGIN_PATH_FULL', __FILE__ );
66
  define( 'IA_PLUGIN_PATH', plugin_basename( __FILE__ ) );
67
  define( 'IA_PLUGIN_FILE_BASENAME', pathinfo( __FILE__, PATHINFO_FILENAME ) );
@@ -157,6 +157,21 @@ if ( version_compare( PHP_VERSION, '5.4', '<' ) ) {
157
 
158
  }
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
 
161
  /**
162
  * Modify the main query for our feed.
4
  * Description: Add support for Instant Articles for Facebook to your WordPress site.
5
  * Author: Automattic, Dekode, Facebook
6
  * Author URI: https://vip.wordpress.com/plugins/instant-articles/
7
+ * Version: 3.3.1
8
  * Text Domain: instant-articles
9
  * License: GPLv2
10
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
61
 
62
  defined( 'ABSPATH' ) || die( 'Shame on you' );
63
 
64
+ define( 'IA_PLUGIN_VERSION', '3.3.1' );
65
  define( 'IA_PLUGIN_PATH_FULL', __FILE__ );
66
  define( 'IA_PLUGIN_PATH', plugin_basename( __FILE__ ) );
67
  define( 'IA_PLUGIN_FILE_BASENAME', pathinfo( __FILE__, PATHINFO_FILENAME ) );
157
 
158
  }
159
 
160
+ /**
161
+ * Whether currently processing an instant article.
162
+ *
163
+ * @param bool Set the status
164
+ * @return bool
165
+ */
166
+ function is_transforming_instant_article( $set_status = null ) {
167
+ static $is_instant_article = false;
168
+
169
+ if ( isset( $set_status ) ) {
170
+ $is_instant_article = (bool) $set_status;
171
+ }
172
+
173
+ return $is_instant_article;
174
+ }
175
 
176
  /**
177
  * Modify the main query for our feed.
languages/de_DE.mo ADDED
Binary file
languages/de_DE.po ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
4
+ "Project-Id-Version: Instant Articles for WP\n"
5
+ "POT-Creation-Date: 2016-05-22 10:10+0200\n"
6
+ "PO-Revision-Date: 2016-05-22 10:12+0200\n"
7
+ "Language-Team: Bjørn Johansen <bjorn@dekode.no>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.8.7\n"
12
+ "X-Poedit-Basepath: ..\n"
13
+ "X-Poedit-WPHeader: instant-articles.php\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
16
+ "Last-Translator: \n"
17
+ "Language: de\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
20
+
21
+ #: feed-template.php:7
22
+ msgid "Instant Articles"
23
+ msgstr "Instant Articles"
24
+
25
+ #. Plugin Name of the plugin/theme
26
+ msgid "Instant Articles for WP"
27
+ msgstr "Instant Articles für WP"
28
+
29
+ #. Description of the plugin/theme
30
+ msgid "Add support for Instant Articles for Facebook to your WordPress site."
31
+ msgstr "Ermöglicht die Funtion von Instant Articles für deine WordPress Seite"
32
+
33
+ #. Author of the plugin/theme
34
+ msgid "Dekode"
35
+ msgstr "Dekode"
36
+
37
+ #. Author URI of the plugin/theme
38
+ msgid "https://dekode.no"
39
+ msgstr "https://dekode.no"
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: trrine, olethomas, bjornjohansen, dekode, automattic, facebook
3
  Tags: instant articles, facebook, mobile
4
  Requires at least: 4.3
5
  Tested up to: 4.6
6
- Stable tag: 3.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
3
  Tags: instant articles, facebook, mobile
4
  Requires at least: 4.3
5
  Tested up to: 4.6
6
+ Stable tag: 3.3.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
release.sh ADDED
@@ -0,0 +1,469 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ red=`tput setaf 1`
3
+ green=`tput setaf 2`
4
+ yellow=`tput setaf 3`
5
+ blue=`tput setaf 4`
6
+ reset=`tput sgr0`
7
+ me='./'`basename "$0"`
8
+
9
+ #--------------------------------
10
+ # Functions
11
+ #--------------------------------
12
+ function show_help {
13
+ cat <<EOF
14
+
15
+ ${green}Usage:${reset}
16
+ ${blue}${me} [-hvs] [-c <command>] [version]${reset}
17
+
18
+ ${green}Arguments:${reset}
19
+ release - Creates a GitHub released based on existing version tag
20
+ bump_version - Creates a new version tag
21
+ version - The target version (ex: 3.2.1)
22
+
23
+ ${green}Options:${reset}
24
+ -h Display this help message
25
+ -v Verbose mode
26
+ -s Simulate only (do not release)
27
+ -c <command> Runs only a single command. Possible commands are:
28
+ - bump_version: generate a new version tag on the repository
29
+ - release: release a new version on GitHub
30
+
31
+ ${green}Examples:${reset}
32
+
33
+ ${blue}${me} 3.3.0${reset}
34
+ Runs bump_version then release for 3.3.0. This is the default use case.
35
+
36
+ ${blue}${me} -c bump_version 3.3.0${reset}
37
+ Generates a new commit on master changing the version to 3.3.0 in
38
+ all relevant files, tags the commit and pushes to remote.
39
+
40
+ ${blue}${me} -c release 3.3.0${reset}
41
+ Creates a new Release on GitHub based on the tag 3.3.0 and uploads
42
+ the binary package based on master.
43
+ ${red}IMPORTANT: this will create a new tag if tag 3.3.0 doesn't exist,
44
+ so make sure to bump_version beforehand.${reset}
45
+
46
+ ${blue}${me} -v 3.3.0${reset}
47
+ Releases 3.3.0 in verbose mode.
48
+
49
+ ${blue}${me} -s 3.3.0${reset}
50
+ Simulates a 3.3.0 release: prints the commands instead of running them.
51
+
52
+ EOF
53
+ }
54
+
55
+ function invalid_usage {
56
+ printf $red
57
+ echo $@
58
+ echo "Aborted"
59
+ printf $reset
60
+ show_help
61
+ exit -1;
62
+ }
63
+ function error_message {
64
+ printf $red
65
+ echo $@
66
+ echo "Aborted"
67
+ printf $reset
68
+ exit -1
69
+ }
70
+ function message {
71
+ if [[ $verbose == 1 ]]; then
72
+ printf $green
73
+ echo $@
74
+ printf $reset
75
+ fi
76
+ }
77
+ function run_message {
78
+ if [[ $simulate == 1 ]]; then
79
+ printf $yellow
80
+ echo $@
81
+ printf $reset
82
+ fi
83
+ }
84
+
85
+ #----------------
86
+ # Read parameters
87
+ #----------------
88
+
89
+ # A POSIX variable
90
+ # Reset in case getopts has been used previously in the shell.
91
+ OPTIND=1
92
+
93
+ # Read options:
94
+ verbose=0
95
+ simulate=0
96
+ selected_cmd='all'
97
+
98
+ while getopts "hvc:s" opt; do
99
+ case "$opt" in
100
+ h|\?)
101
+ show_help
102
+ exit 0
103
+ ;;
104
+ v) verbose=1
105
+ ;;
106
+ s) simulate=1
107
+ ;;
108
+ c) selected_cmd="${OPTARG}"
109
+ ;;
110
+ esac
111
+ done
112
+
113
+ shift $((OPTIND-1))
114
+
115
+ # Read argument
116
+ version=$1
117
+
118
+ # Validates arguments
119
+ if [[ $2 ]]; then
120
+ invalid_usage "Invalid parameters"
121
+ fi
122
+
123
+ if [[ ! $( echo $version | grep -Ee '^[0-9]+\.[0-9]+(\.[0-9]+)?$' ) ]]; then
124
+ invalid_usage "Invalid version provided"
125
+ fi
126
+
127
+ message "Releasing version: $version"
128
+ message "Running in verbose mode"
129
+ if [[ $simulate == 1 ]]; then
130
+ message "Running in simulation mode"
131
+ fi
132
+
133
+ #---------------------------------
134
+ # Check if we have the right tools
135
+ #---------------------------------
136
+
137
+ if ! type "git" > /dev/null; then
138
+ error_message "git not found, please install git before continuing: http://git.org"
139
+ else
140
+ message "Found git: $(git --version)"
141
+ fi
142
+
143
+ if ! type "js" > /dev/null; then
144
+ error_message "SpiderMonkey interpreter not found, please install SpiderMonkey before continuing"
145
+ else
146
+ message "Found SpiderMonkey"
147
+ fi
148
+
149
+ #------------------------------------
150
+ # Check if we are in the right folder
151
+ #------------------------------------
152
+ if [[ ! -e '.git/config' ]]; then
153
+ error_message "You should run this command from the root directory of your repository."
154
+ fi
155
+ if [[ ! $( cat .git/config | grep -i 'automattic/facebook-instant-articles-wp') ]]; then
156
+ error_message "You should run this command from the root directory of the facebook-instant-articles-wp repository."
157
+ fi
158
+
159
+ repo_dir=$(pwd)
160
+
161
+ #-------------------
162
+ # Manages simulation
163
+ #-------------------
164
+ function run {
165
+ if [[ $simulate == 1 ]]; then
166
+ run_message $@
167
+ else
168
+ "$@"
169
+ fi
170
+ }
171
+
172
+ function revert_repo {
173
+ run cd $repo_dir
174
+ if [[ $branch_name != 'master' ]]; then
175
+ message "Going back to $branch_name"
176
+ # stashes anything possibly left from the script execution
177
+ run git stash
178
+ run git checkout $branch_name
179
+ fi
180
+ if [[ $stash_ref ]]; then
181
+ message "Applying stashed changes"
182
+ run git stash apply $stash_ref
183
+ fi
184
+ }
185
+
186
+ function confirm {
187
+ confirm=''
188
+ while [[ $confirm != 'a' && $confirm != 'y' ]]; do
189
+ printf $blue
190
+ printf "%b" "$*"
191
+ printf ' (y)es/(a)bort: '
192
+ printf $red
193
+ read -n 1 confirm
194
+ printf "\n"
195
+ done
196
+ if [[ $confirm != 'y' ]]; then
197
+ revert_repo
198
+ error_message 'Execution aborted by the user'
199
+ exit -1
200
+ fi
201
+ printf $reset
202
+ }
203
+
204
+ function ask {
205
+ user_response=''
206
+ while [[ $user_response != 'n' && $user_response != 'y' ]]; do
207
+ printf $blue
208
+ printf "%b" "$*"
209
+ printf ' (y)es/(n)o: '
210
+ printf $red
211
+ read -n 1 user_response
212
+ printf "\n"
213
+ done
214
+ printf $reset
215
+ }
216
+
217
+ function prompt {
218
+ user_response=''
219
+ printf $blue
220
+ printf "%b" "$*"
221
+ printf $red
222
+ read user_response
223
+ printf $reset
224
+ }
225
+
226
+ function prompt_password {
227
+ user_response=''
228
+ printf $blue
229
+ printf "%b" "$*"
230
+ printf $red
231
+ read -s user_response
232
+ printf $reset
233
+ }
234
+
235
+ #----------------------
236
+ # Commands
237
+ #----------------------
238
+ function bump_version {
239
+
240
+ message "Stashing current work..."
241
+
242
+ stash_ref=$(git stash create)
243
+ run_message git stash create
244
+
245
+ if [[ $stash_ref ]]; then
246
+ run git reset --hard
247
+ message "Stashed current work to: $stash_ref"
248
+ else
249
+ message "Nothing to stash"
250
+ fi
251
+
252
+ branch_name="$(git symbolic-ref HEAD 2>/dev/null)"
253
+ branch_name=${branch_name##refs/heads/}
254
+ message "Current branch: $branch_name"
255
+
256
+ if [[ $branch_name != 'master' ]]; then
257
+ message "Switching to master..."
258
+ run git checkout master
259
+ fi
260
+
261
+ message "Pulling latest version from GitHub"
262
+ run git pull --rebase
263
+
264
+ confirm "Replace stable tag on readme.txt with $version?"
265
+ message "Replacing stable tag on readme.txt"
266
+ run sed -i -e "s/Stable tag: .*/Stable tag: $version/" ./readme.txt
267
+ run git diff
268
+ confirm "Add changes to commit?"
269
+ run git add readme.txt
270
+ run rm readme.txt-e
271
+
272
+ confirm "Replace version on facebook-instant-articles-wp.php with $version?"
273
+ message "Replacing version on facebook-instant-articles-wp.php"
274
+ run sed -i -e "s/^ \* Version: .*/ * Version: $version/" facebook-instant-articles.php
275
+ run sed -i -e "s/define( 'IA_PLUGIN_VERSION', '[0-9.]*' );/define( 'IA_PLUGIN_VERSION', '$version' );/" facebook-instant-articles.php
276
+ run git diff
277
+ confirm "Add changes to commit?"
278
+ run git add facebook-instant-articles.php
279
+ run rm facebook-instant-articles.php-e
280
+
281
+ confirm "Commit version bump on master with message 'Bump version to $version'?"
282
+ run git commit -m "Bump version to $version"
283
+
284
+ confirm "Create tag $version?"
285
+ run git tag $version
286
+
287
+ confirm "Push tag and commit to GitHub?"
288
+ run git push
289
+ run git push --tags
290
+
291
+ revert_repo
292
+
293
+ echo "🍺 Tag $version created!"
294
+ }
295
+
296
+ function release {
297
+
298
+ confirm "Create a new release for $version?"
299
+
300
+ message "Stashing current work..."
301
+
302
+ stash_ref=$(git stash create)
303
+ run_message git stash create
304
+
305
+ if [[ $stash_ref ]]; then
306
+ run git reset --hard
307
+ message "Stashed current work to: $stash_ref"
308
+ else
309
+ message "Nothing to stash"
310
+ fi
311
+
312
+ branch_name="$(git symbolic-ref HEAD 2>/dev/null)"
313
+ branch_name=${branch_name##refs/heads/}
314
+ message "Current branch: $branch_name"
315
+
316
+ if [[ $branch_name != 'master' ]]; then
317
+ message "Switching to master..."
318
+ run git checkout master
319
+ fi
320
+
321
+ message "Pulling latest version from GitHub"
322
+ run git pull --rebase
323
+
324
+ if [[ ! -e resty ]]; then
325
+ message "Downloading resty to connect to GitHub API"
326
+ run curl -L http://github.com/micha/resty/raw/2.2/resty > resty
327
+ fi
328
+ if [[ ! -e jsawk ]]; then
329
+ message "Downloading jsawk to parse info from GitHub API"
330
+ run curl -L http://github.com/micha/jsawk/raw/1.4/jsawk > jsawk
331
+ fi
332
+
333
+ prompt "GitHub access-token (required only for 2fac):"
334
+ github_access_token=$user_response
335
+
336
+ if [[ github_access_token ]]; then
337
+ run . resty -W 'https://api.github.com' -H "Authorization: token $github_access_token"
338
+ else
339
+ prompt "GitHub username:"
340
+ github_username=$user_response
341
+
342
+ prompt_password "GitHub password:"
343
+ github_password=$user_response
344
+
345
+ run . resty -W 'https://api.github.com' -u $github_username:$github_password
346
+ fi
347
+
348
+ response=$(run POST /repos/Automattic/facebook-instant-articles-wp/releases "
349
+ {
350
+ \"tag_name\": \"$version\",
351
+ \"target_commitish\": \"master\",
352
+ \"name\": \"$version\",
353
+ \"body\": \"Version $version\",
354
+ \"draft\": false,
355
+ \"prerelease\": false
356
+ }
357
+ ");
358
+
359
+ if [[ $response ]]; then
360
+ message "Release $version created!"
361
+ else
362
+ error_message "Couldn't create release"
363
+ fi
364
+
365
+ upload_url=$( echo $response | . jsawk -n 'out(this.upload_url)' | sed -e "s/{[^}]*}//g" )
366
+ release_id=$( echo $response | . jsawk -n 'out(this.id)' )
367
+
368
+ message "Upload URL: $upload_url"
369
+
370
+ message "Creating binary file"
371
+ run composer install
372
+ run zip -qr facebook-instant-articles-wp.zip .
373
+
374
+ message "Uploading binary for release..."
375
+
376
+ if [[ github_access_token ]]; then
377
+ response=$(run curl -H "Authorization: token $github_access_token" -H "Content-Type: application/zip" --data-binary @facebook-instant-articles-wp.zip $upload_url\?name=facebook-instant-articles-wp-$version.zip )
378
+ else
379
+ response=$(run curl -u $github_username:$github_password -H "Content-Type: application/zip" --data-binary @facebook-instant-articles-wp.zip $upload_url\?name=facebook-instant-articles-wp-$version.zip )
380
+ fi
381
+
382
+ run rm facebook-instant-articles-wp.zip
383
+ revert_repo
384
+
385
+ if [[ $response ]]; then
386
+ echo "🍺 Release $version successfully created"
387
+ else
388
+ error_message "Couldn't upload file"
389
+ fi
390
+
391
+
392
+ }
393
+
394
+ function publish {
395
+ confirm "Publish $version to WordPress plugin repository?"
396
+
397
+ message "Stashing current work..."
398
+
399
+ stash_ref=$(git stash create)
400
+ run_message git stash create
401
+
402
+ if [[ $stash_ref ]]; then
403
+ run git reset --hard
404
+ message "Stashed current work to: $stash_ref"
405
+ else
406
+ message "Nothing to stash"
407
+ fi
408
+
409
+ branch_name="$(git symbolic-ref HEAD 2>/dev/null)"
410
+ branch_name=${branch_name##refs/heads/}
411
+ message "Current branch: $branch_name"
412
+
413
+ if [[ $branch_name != 'master' ]]; then
414
+ message "Switching to master..."
415
+ run git checkout master
416
+ fi
417
+
418
+ message "Pulling latest version from GitHub"
419
+ run git pull --rebase
420
+
421
+ tmp_dir=$(mktemp -d)
422
+
423
+ message "Updating composer dependencies"
424
+ composer install
425
+
426
+ message "Checking out SVN repository..."
427
+ run cd $tmp_dir
428
+ run svn checkout -q https://plugins.svn.wordpress.org/fb-instant-articles/
429
+ run cd fb-instant-articles/trunk/
430
+
431
+ confirm "Copy new version to trunk?"
432
+ run cp -rf $repo_dir/* ./
433
+
434
+ # Removes development files we know shouldn't make to the SVN repo
435
+ run rm -rf .[!.]* # this will remove all hidden files
436
+ run rm -rf bin
437
+ run rm -rf tests
438
+ run rm -rf composer*
439
+ run rm -rf phpunit*
440
+ run rm -rf vendor/apache/log4php/src/test
441
+ run rm -rf facebook-instant-articles-wp.zip
442
+ run rm -rf jsawk
443
+ run rm -rf resty
444
+ run rm -rf vendor/apache/log4php/.git
445
+
446
+ run svn st | grep '^\?' | sed 's/^\? *//' | xargs -I% svn add %
447
+ run svn status
448
+ ask "Review changes?"
449
+ if [[ $user_response == 'y' ]]; then
450
+ run svn diff
451
+ fi
452
+ confirm "Commit changes to trunk?"
453
+ run svn commit -m "Release $version"
454
+ confirm "Tag version $version?"
455
+ run svn cp ../trunk ../tags/$version
456
+ run cd ..
457
+ run svn commit -m "Tag $version"
458
+
459
+ revert_repo
460
+
461
+ echo "🍺 Published $version successfully"
462
+ }
463
+
464
+ # Run right command
465
+ if [[ $selected_cmd == 'bump_version' ]]; then bump_version; exit 0; fi
466
+ if [[ $selected_cmd == 'release' ]]; then release; exit 0; fi
467
+ if [[ $selected_cmd == 'publish' ]]; then publish; exit 0; fi
468
+ if [[ $selected_cmd == 'all' ]]; then bump_version; release; publish; exit 0; fi
469
+ error_message "Invalid command $selected_cmd"
rules-configuration.json CHANGED
@@ -62,6 +62,9 @@
62
  }, {
63
  "class": "PassThroughRule",
64
  "selector": "blockquote p"
 
 
 
65
  }, {
66
  "class": "ImageRule",
67
  "selector": "img",
62
  }, {
63
  "class": "PassThroughRule",
64
  "selector": "blockquote p"
65
+ }, {
66
+ "class": "ItalicRule",
67
+ "selector": "cite"
68
  }, {
69
  "class": "ImageRule",
70
  "selector": "img",
vendor/facebook/facebook-instant-articles-sdk-php/.github/ISSUE_TEMPLATE.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Steps required to reproduce the problem
2
+
3
+ 1.
4
+ 2.
5
+ 3.
6
+
7
+ # Expected Result
8
+
9
+ *
10
+
11
+ # Actual Result
12
+
13
+ *
vendor/facebook/facebook-instant-articles-sdk-php/.github/PULL_REQUEST_TEMPLATE.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ This PR
2
+
3
+ * [x]
4
+ * [ ]
5
+ * [ ]
6
+
7
+ Follows #.
8
+ Related to #.
9
+ Fixes #.
vendor/facebook/facebook-instant-articles-sdk-php/.gitignore ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ composer.phar
2
+ /vendor/
3
+ *.ignored
4
+ **/IgnoredTest.php
5
+ .DS_Store
vendor/facebook/facebook-instant-articles-sdk-php/composer.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "facebook/facebook-instant-articles-sdk-php",
3
+ "description": "Facebook Instant Articles SDK for PHP",
4
+ "keywords": ["facebook", "sdk", "instant", "articles"],
5
+ "type": "library",
6
+ "homepage": "https://github.com/facebook/facebook-instant-articles-sdk-php",
7
+ "license": "proprietary",
8
+ "authors": [{
9
+ "name": "Facebook",
10
+ "homepage": "https://github.com/facebook/facebook-instant-articles-sdk-php/contributors"
11
+ }],
12
+ "require": {
13
+ "php": "^5.4 || ^7.0",
14
+ "symfony/css-selector": "2.8.* || ^3.0",
15
+ "facebook/graph-sdk": "~5.0",
16
+ "apache/log4php": "2.3.0"
17
+ },
18
+ "require-dev": {
19
+ "fzaninotto/faker": "^1.6.0",
20
+ "phpunit/phpunit": "^4.8",
21
+ "squizlabs/php_codesniffer": "^2.6.0"
22
+ },
23
+ "autoload": {
24
+ "psr-4": {
25
+ "Facebook\\InstantArticles\\": "src/Facebook/InstantArticles/"
26
+ }
27
+ },
28
+ "autoload-dev": {
29
+ "psr-4": {
30
+ "Facebook\\InstantArticles\\": "tests/Facebook/InstantArticles/"
31
+ }
32
+ },
33
+ "scripts": {
34
+ "all": [
35
+ "@cs",
36
+ "@test"
37
+ ],
38
+ "cs": [
39
+ "composer install",
40
+ "phpcbf --standard=phpcs.xml -p || phpcs --standard=phpcs.xml -p"
41
+ ],
42
+ "test": [
43
+ "composer install",
44
+ "phpunit"
45
+ ]
46
+ }
47
+ }
vendor/facebook/facebook-instant-articles-sdk-php/composer.lock ADDED
@@ -0,0 +1,1246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_readme": [
3
+ "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "content-hash": "8841c13d6e972dcf95be310e7057845a",
8
+ "packages": [
9
+ {
10
+ "name": "apache/log4php",
11
+ "version": "2.3.0",
12
+ "source": {
13
+ "type": "git",
14
+ "url": "https://git-wip-us.apache.org/repos/asf/logging-log4php.git",
15
+ "reference": "8c6df2481cd68d0d211d38f700406c5f0a9de0c2"
16
+ },
17
+ "require": {
18
+ "php": ">=5.2.7"
19
+ },
20
+ "type": "library",
21
+ "autoload": {
22
+ "classmap": [
23
+ "src/main/php/"
24
+ ]
25
+ },
26
+ "notification-url": "https://packagist.org/downloads/",
27
+ "license": [
28
+ "Apache-2.0"
29
+ ],
30
+ "description": "A versatile logging framework for PHP",
31
+ "homepage": "http://logging.apache.org/log4php/",
32
+ "keywords": [
33
+ "log",
34
+ "logging",
35
+ "php"
36
+ ],
37
+ "time": "2012-10-26T09:13:25+00:00"
38
+ },
39
+ {
40
+ "name": "facebook/graph-sdk",
41
+ "version": "5.4.2",
42
+ "source": {
43
+ "type": "git",
44
+ "url": "https://github.com/facebook/php-graph-sdk.git",
45
+ "reference": "2839246e971aef150650196acbb46d47e5207370"
46
+ },
47
+ "dist": {
48
+ "type": "zip",
49
+ "url": "https://api.github.com/repos/facebook/php-graph-sdk/zipball/2839246e971aef150650196acbb46d47e5207370",
50
+ "reference": "2839246e971aef150650196acbb46d47e5207370",
51
+ "shasum": ""
52
+ },
53
+ "require": {
54
+ "php": "^5.4|^7.0"
55
+ },
56
+ "require-dev": {
57
+ "guzzlehttp/guzzle": "~5.0",
58
+ "mockery/mockery": "~0.8",
59
+ "phpunit/phpunit": "~4.0"
60
+ },
61
+ "suggest": {
62
+ "guzzlehttp/guzzle": "Allows for implementation of the Guzzle HTTP client",
63
+ "paragonie/random_compat": "Provides a better CSPRNG option in PHP 5"
64
+ },
65
+ "type": "library",
66
+ "extra": {
67
+ "branch-alias": {
68
+ "dev-master": "5.x-dev"
69
+ }
70
+ },
71
+ "autoload": {
72
+ "psr-4": {
73
+ "Facebook\\": "src/Facebook/"
74
+ },
75
+ "files": [
76
+ "src/Facebook/polyfills.php"
77
+ ]
78
+ },
79
+ "notification-url": "https://packagist.org/downloads/",
80
+ "license": [
81
+ "Facebook Platform"
82
+ ],
83
+ "authors": [
84
+ {
85
+ "name": "Facebook",
86
+ "homepage": "https://github.com/facebook/php-graph-sdk/contributors"
87
+ }
88
+ ],
89
+ "description": "Facebook SDK for PHP",
90
+ "homepage": "https://github.com/facebook/php-graph-sdk",
91
+ "keywords": [
92
+ "facebook",
93
+ "sdk"
94
+ ],
95
+ "time": "2016-11-15T14:34:16+00:00"
96
+ },
97
+ {
98
+ "name": "symfony/css-selector",
99
+ "version": "v2.8.14",
100
+ "source": {
101
+ "type": "git",
102
+ "url": "https://github.com/symfony/css-selector.git",
103
+ "reference": "981abbbd6ba49af338a98490cbe29e7f39ca9fa9"
104
+ },
105
+ "dist": {
106
+ "type": "zip",
107
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/981abbbd6ba49af338a98490cbe29e7f39ca9fa9",
108
+ "reference": "981abbbd6ba49af338a98490cbe29e7f39ca9fa9",
109
+ "shasum": ""
110
+ },
111
+ "require": {
112
+ "php": ">=5.3.9"
113
+ },
114
+ "type": "library",
115
+ "extra": {
116
+ "branch-alias": {
117
+ "dev-master": "2.8-dev"
118
+ }
119
+ },
120
+ "autoload": {
121
+ "psr-4": {
122
+ "Symfony\\Component\\CssSelector\\": ""
123
+ },
124
+ "exclude-from-classmap": [
125
+ "/Tests/"
126
+ ]
127
+ },
128
+ "notification-url": "https://packagist.org/downloads/",
129
+ "license": [
130
+ "MIT"
131
+ ],
132
+ "authors": [
133
+ {
134
+ "name": "Jean-François Simon",
135
+ "email": "jeanfrancois.simon@sensiolabs.com"
136
+ },
137
+ {
138
+ "name": "Fabien Potencier",
139
+ "email": "fabien@symfony.com"
140
+ },
141
+ {
142
+ "name": "Symfony Community",
143
+ "homepage": "https://symfony.com/contributors"
144
+ }
145
+ ],
146
+ "description": "Symfony CssSelector Component",
147
+ "homepage": "https://symfony.com",
148
+ "time": "2016-11-03T07:52:58+00:00"
149
+ }
150
+ ],
151
+ "packages-dev": [
152
+ {
153
+ "name": "doctrine/instantiator",
154
+ "version": "1.0.5",
155
+ "source": {
156
+ "type": "git",
157
+ "url": "https://github.com/doctrine/instantiator.git",
158
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
159
+ },
160
+ "dist": {
161
+ "type": "zip",
162
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
163
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
164
+ "shasum": ""
165
+ },
166
+ "require": {
167
+ "php": ">=5.3,<8.0-DEV"
168
+ },
169
+ "require-dev": {
170
+ "athletic/athletic": "~0.1.8",
171
+ "ext-pdo": "*",
172
+ "ext-phar": "*",
173
+ "phpunit/phpunit": "~4.0",
174
+ "squizlabs/php_codesniffer": "~2.0"
175
+ },
176
+ "type": "library",
177
+ "extra": {
178
+ "branch-alias": {
179
+ "dev-master": "1.0.x-dev"
180
+ }
181
+ },
182
+ "autoload": {
183
+ "psr-4": {
184
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
185
+ }
186
+ },
187
+ "notification-url": "https://packagist.org/downloads/",
188
+ "license": [
189
+ "MIT"
190
+ ],
191
+ "authors": [
192
+ {
193
+ "name": "Marco Pivetta",
194
+ "email": "ocramius@gmail.com",
195
+ "homepage": "http://ocramius.github.com/"
196
+ }
197
+ ],
198
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
199
+ "homepage": "https://github.com/doctrine/instantiator",
200
+ "keywords": [
201
+ "constructor",
202
+ "instantiate"
203
+ ],
204
+ "time": "2015-06-14T21:17:01+00:00"
205
+ },
206
+ {
207
+ "name": "fzaninotto/faker",
208
+ "version": "v1.6.0",
209
+ "source": {
210
+ "type": "git",
211
+ "url": "https://github.com/fzaninotto/Faker.git",
212
+ "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123"
213
+ },
214
+ "dist": {
215
+ "type": "zip",
216
+ "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123",
217
+ "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123",
218
+ "shasum": ""
219
+ },
220
+ "require": {
221
+ "php": "^5.3.3|^7.0"
222
+ },
223
+ "require-dev": {
224
+ "ext-intl": "*",
225
+ "phpunit/phpunit": "~4.0",
226
+ "squizlabs/php_codesniffer": "~1.5"
227
+ },
228
+ "type": "library",
229
+ "extra": {
230
+ "branch-alias": []
231
+ },
232
+ "autoload": {
233
+ "psr-4": {
234
+ "Faker\\": "src/Faker/"
235
+ }
236
+ },
237
+ "notification-url": "https://packagist.org/downloads/",
238
+ "license": [
239
+ "MIT"
240
+ ],
241
+ "authors": [
242
+ {
243
+ "name": "François Zaninotto"
244
+ }
245
+ ],
246
+ "description": "Faker is a PHP library that generates fake data for you.",
247
+ "keywords": [
248
+ "data",
249
+ "faker",
250
+ "fixtures"
251
+ ],
252
+ "time": "2016-04-29T12:21:54+00:00"
253
+ },
254
+ {
255
+ "name": "phpdocumentor/reflection-docblock",
256
+ "version": "2.0.4",
257
+ "source": {
258
+ "type": "git",
259
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
260
+ "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
261
+ },
262
+ "dist": {
263
+ "type": "zip",
264
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
265
+ "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
266
+ "shasum": ""
267
+ },
268
+ "require": {
269
+ "php": ">=5.3.3"
270
+ },
271
+ "require-dev": {
272
+ "phpunit/phpunit": "~4.0"
273
+ },
274
+ "suggest": {
275
+ "dflydev/markdown": "~1.0",
276
+ "erusev/parsedown": "~1.0"
277
+ },
278
+ "type": "library",
279
+ "extra": {
280
+ "branch-alias": {
281
+ "dev-master": "2.0.x-dev"
282
+ }
283
+ },
284
+ "autoload": {
285
+ "psr-0": {
286
+ "phpDocumentor": [
287
+ "src/"
288
+ ]
289
+ }
290
+ },
291
+ "notification-url": "https://packagist.org/downloads/",
292
+ "license": [
293
+ "MIT"
294
+ ],
295
+ "authors": [
296
+ {
297
+ "name": "Mike van Riel",
298
+ "email": "mike.vanriel@naenius.com"
299
+ }
300
+ ],
301
+ "time": "2015-02-03T12:10:50+00:00"
302
+ },
303
+ {
304
+ "name": "phpspec/prophecy",
305
+ "version": "v1.6.2",
306
+ "source": {
307
+ "type": "git",
308
+ "url": "https://github.com/phpspec/prophecy.git",
309
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
310
+ },
311
+ "dist": {
312
+ "type": "zip",
313
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
314
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
315
+ "shasum": ""
316
+ },
317
+ "require": {
318
+ "doctrine/instantiator": "^1.0.2",
319
+ "php": "^5.3|^7.0",
320
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
321
+ "sebastian/comparator": "^1.1",
322
+ "sebastian/recursion-context": "^1.0|^2.0"
323
+ },
324
+ "require-dev": {
325
+ "phpspec/phpspec": "^2.0",
326
+ "phpunit/phpunit": "^4.8 || ^5.6.5"
327
+ },
328
+ "type": "library",
329
+ "extra": {
330
+ "branch-alias": {
331
+ "dev-master": "1.6.x-dev"
332
+ }
333
+ },
334
+ "autoload": {
335
+ "psr-0": {
336
+ "Prophecy\\": "src/"
337
+ }
338
+ },
339
+ "notification-url": "https://packagist.org/downloads/",
340
+ "license": [
341
+ "MIT"
342
+ ],
343
+ "authors": [
344
+ {
345
+ "name": "Konstantin Kudryashov",
346
+ "email": "ever.zet@gmail.com",
347
+ "homepage": "http://everzet.com"
348
+ },
349
+ {
350
+ "name": "Marcello Duarte",
351
+ "email": "marcello.duarte@gmail.com"
352
+ }
353
+ ],
354
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
355
+ "homepage": "https://github.com/phpspec/prophecy",
356
+ "keywords": [
357
+ "Double",
358
+ "Dummy",
359
+ "fake",
360
+ "mock",
361
+ "spy",
362
+ "stub"
363
+ ],
364
+ "time": "2016-11-21T14:58:47+00:00"
365
+ },
366
+ {
367
+ "name": "phpunit/php-code-coverage",
368
+ "version": "2.2.4",
369
+ "source": {
370
+ "type": "git",
371
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
372
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
373
+ },
374
+ "dist": {
375
+ "type": "zip",
376
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
377
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
378
+ "shasum": ""
379
+ },
380
+ "require": {
381
+ "php": ">=5.3.3",
382
+ "phpunit/php-file-iterator": "~1.3",
383
+ "phpunit/php-text-template": "~1.2",
384
+ "phpunit/php-token-stream": "~1.3",
385
+ "sebastian/environment": "^1.3.2",
386
+ "sebastian/version": "~1.0"
387
+ },
388
+ "require-dev": {
389
+ "ext-xdebug": ">=2.1.4",
390
+ "phpunit/phpunit": "~4"
391
+ },
392
+ "suggest": {
393
+ "ext-dom": "*",
394
+ "ext-xdebug": ">=2.2.1",
395
+ "ext-xmlwriter": "*"
396
+ },
397
+ "type": "library",
398
+ "extra": {
399
+ "branch-alias": {
400
+ "dev-master": "2.2.x-dev"
401
+ }
402
+ },
403
+ "autoload": {
404
+ "classmap": [
405
+ "src/"
406
+ ]
407
+ },
408
+ "notification-url": "https://packagist.org/downloads/",
409
+ "license": [
410
+ "BSD-3-Clause"
411
+ ],
412
+ "authors": [
413
+ {
414
+ "name": "Sebastian Bergmann",
415
+ "email": "sb@sebastian-bergmann.de",
416
+ "role": "lead"
417
+ }
418
+ ],
419
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
420
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
421
+ "keywords": [
422
+ "coverage",
423
+ "testing",
424
+ "xunit"
425
+ ],
426
+ "time": "2015-10-06T15:47:00+00:00"
427
+ },
428
+ {
429
+ "name": "phpunit/php-file-iterator",
430
+ "version": "1.4.1",
431
+ "source": {
432
+ "type": "git",
433
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
434
+ "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
435
+ },
436
+ "dist": {
437
+ "type": "zip",
438
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
439
+ "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
440
+ "shasum": ""
441
+ },
442
+ "require": {
443
+ "php": ">=5.3.3"
444
+ },
445
+ "type": "library",
446
+ "extra": {
447
+ "branch-alias": {
448
+ "dev-master": "1.4.x-dev"
449
+ }
450
+ },
451
+ "autoload": {
452
+ "classmap": [
453
+ "src/"
454
+ ]
455
+ },
456
+ "notification-url": "https://packagist.org/downloads/",
457
+ "license": [
458
+ "BSD-3-Clause"
459
+ ],
460
+ "authors": [
461
+ {
462
+ "name": "Sebastian Bergmann",
463
+ "email": "sb@sebastian-bergmann.de",
464
+ "role": "lead"
465
+ }
466
+ ],
467
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
468
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
469
+ "keywords": [
470
+ "filesystem",
471
+ "iterator"
472
+ ],
473
+ "time": "2015-06-21T13:08:43+00:00"
474
+ },
475
+ {
476
+ "name": "phpunit/php-text-template",
477
+ "version": "1.2.1",
478
+ "source": {
479
+ "type": "git",
480
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
481
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
482
+ },
483
+ "dist": {
484
+ "type": "zip",
485
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
486
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
487
+ "shasum": ""
488
+ },
489
+ "require": {
490
+ "php": ">=5.3.3"
491
+ },
492
+ "type": "library",
493
+ "autoload": {
494
+ "classmap": [
495
+ "src/"
496
+ ]
497
+ },
498
+ "notification-url": "https://packagist.org/downloads/",
499
+ "license": [
500
+ "BSD-3-Clause"
501
+ ],
502
+ "authors": [
503
+ {
504
+ "name": "Sebastian Bergmann",
505
+ "email": "sebastian@phpunit.de",
506
+ "role": "lead"
507
+ }
508
+ ],
509
+ "description": "Simple template engine.",
510
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
511
+ "keywords": [
512
+ "template"
513
+ ],
514
+ "time": "2015-06-21T13:50:34+00:00"
515
+ },
516
+ {
517
+ "name": "phpunit/php-timer",
518
+ "version": "1.0.8",
519
+ "source": {
520
+ "type": "git",
521
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
522
+ "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
523
+ },
524
+ "dist": {
525
+ "type": "zip",
526
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
527
+ "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
528
+ "shasum": ""
529
+ },
530
+ "require": {
531
+ "php": ">=5.3.3"
532
+ },
533
+ "require-dev": {
534
+ "phpunit/phpunit": "~4|~5"
535
+ },
536
+ "type": "library",
537
+ "autoload": {
538
+ "classmap": [
539
+ "src/"
540
+ ]
541
+ },
542
+ "notification-url": "https://packagist.org/downloads/",
543
+ "license": [
544
+ "BSD-3-Clause"
545
+ ],
546
+ "authors": [
547
+ {
548
+ "name": "Sebastian Bergmann",
549
+ "email": "sb@sebastian-bergmann.de",
550
+ "role": "lead"
551
+ }
552
+ ],
553
+ "description": "Utility class for timing",
554
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
555
+ "keywords": [
556
+ "timer"
557
+ ],
558
+ "time": "2016-05-12T18:03:57+00:00"
559
+ },
560
+ {
561
+ "name": "phpunit/php-token-stream",
562
+ "version": "1.4.9",
563
+ "source": {
564
+ "type": "git",
565
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
566
+ "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
567
+ },
568
+ "dist": {
569
+ "type": "zip",
570
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b",
571
+ "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b",
572
+ "shasum": ""
573
+ },
574
+ "require": {
575
+ "ext-tokenizer": "*",
576
+ "php": ">=5.3.3"
577
+ },
578
+ "require-dev": {
579
+ "phpunit/phpunit": "~4.2"
580
+ },
581
+ "type": "library",
582
+ "extra": {
583
+ "branch-alias": {
584
+ "dev-master": "1.4-dev"
585
+ }
586
+ },
587
+ "autoload": {
588
+ "classmap": [
589
+ "src/"
590
+ ]
591
+ },
592
+ "notification-url": "https://packagist.org/downloads/",
593
+ "license": [
594
+ "BSD-3-Clause"
595
+ ],
596
+ "authors": [
597
+ {
598
+ "name": "Sebastian Bergmann",
599
+ "email": "sebastian@phpunit.de"
600
+ }
601
+ ],
602
+ "description": "Wrapper around PHP's tokenizer extension.",
603
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
604
+ "keywords": [
605
+ "tokenizer"
606
+ ],
607
+ "time": "2016-11-15T14:06:22+00:00"
608
+ },
609
+ {
610
+ "name": "phpunit/phpunit",
611
+ "version": "4.8.29",
612
+ "source": {
613
+ "type": "git",
614
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
615
+ "reference": "f19d481b468b76a7fb55eb2b772ed487e484891e"
616
+ },
617
+ "dist": {
618
+ "type": "zip",
619
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f19d481b468b76a7fb55eb2b772ed487e484891e",
620
+ "reference": "f19d481b468b76a7fb55eb2b772ed487e484891e",
621
+ "shasum": ""
622
+ },
623
+ "require": {
624
+ "ext-dom": "*",
625
+ "ext-json": "*",
626
+ "ext-pcre": "*",
627
+ "ext-reflection": "*",
628
+ "ext-spl": "*",
629
+ "php": ">=5.3.3",
630
+ "phpspec/prophecy": "^1.3.1",
631
+ "phpunit/php-code-coverage": "~2.1",
632
+ "phpunit/php-file-iterator": "~1.4",
633
+ "phpunit/php-text-template": "~1.2",
634
+ "phpunit/php-timer": "^1.0.6",
635
+ "phpunit/phpunit-mock-objects": "~2.3",
636
+ "sebastian/comparator": "~1.2.2",
637
+ "sebastian/diff": "~1.2",
638
+ "sebastian/environment": "~1.3",
639
+ "sebastian/exporter": "~1.2",
640
+ "sebastian/global-state": "~1.0",
641
+ "sebastian/version": "~1.0",
642
+ "symfony/yaml": "~2.1|~3.0"
643
+ },
644
+ "suggest": {
645
+ "phpunit/php-invoker": "~1.1"
646
+ },
647
+ "bin": [
648
+ "phpunit"
649
+ ],
650
+ "type": "library",
651
+ "extra": {
652
+ "branch-alias": {
653
+ "dev-master": "4.8.x-dev"
654
+ }
655
+ },
656
+ "autoload": {
657
+ "classmap": [
658
+ "src/"
659
+ ]
660
+ },
661
+ "notification-url": "https://packagist.org/downloads/",
662
+ "license": [
663
+ "BSD-3-Clause"
664
+ ],
665
+ "authors": [
666
+ {
667
+ "name": "Sebastian Bergmann",
668
+ "email": "sebastian@phpunit.de",
669
+ "role": "lead"
670
+ }
671
+ ],
672
+ "description": "The PHP Unit Testing framework.",
673
+ "homepage": "https://phpunit.de/",
674
+ "keywords": [
675
+ "phpunit",
676
+ "testing",
677
+ "xunit"
678
+ ],
679
+ "time": "2016-11-20T10:35:28+00:00"
680
+ },
681
+ {
682
+ "name": "phpunit/phpunit-mock-objects",
683
+ "version": "2.3.8",
684
+ "source": {
685
+ "type": "git",
686
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
687
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
688
+ },
689
+ "dist": {
690
+ "type": "zip",
691
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
692
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
693
+ "shasum": ""
694
+ },
695
+ "require": {
696
+ "doctrine/instantiator": "^1.0.2",
697
+ "php": ">=5.3.3",
698
+ "phpunit/php-text-template": "~1.2",
699
+ "sebastian/exporter": "~1.2"
700
+ },
701
+ "require-dev": {
702
+ "phpunit/phpunit": "~4.4"
703
+ },
704
+ "suggest": {
705
+ "ext-soap": "*"
706
+ },
707
+ "type": "library",
708
+ "extra": {
709
+ "branch-alias": {
710
+ "dev-master": "2.3.x-dev"
711
+ }
712
+ },
713
+ "autoload": {
714
+ "classmap": [
715
+ "src/"
716
+ ]
717
+ },
718
+ "notification-url": "https://packagist.org/downloads/",
719
+ "license": [
720
+ "BSD-3-Clause"
721
+ ],
722
+ "authors": [
723
+ {
724
+ "name": "Sebastian Bergmann",
725
+ "email": "sb@sebastian-bergmann.de",
726
+ "role": "lead"
727
+ }
728
+ ],
729
+ "description": "Mock Object library for PHPUnit",
730
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
731
+ "keywords": [
732
+ "mock",
733
+ "xunit"
734
+ ],
735
+ "time": "2015-10-02T06:51:40+00:00"
736
+ },
737
+ {
738
+ "name": "sebastian/comparator",
739
+ "version": "1.2.2",
740
+ "source": {
741
+ "type": "git",
742
+ "url": "https://github.com/sebastianbergmann/comparator.git",
743
+ "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f"
744
+ },
745
+ "dist": {
746
+ "type": "zip",
747
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
748
+ "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
749
+ "shasum": ""
750
+ },
751
+ "require": {
752
+ "php": ">=5.3.3",
753
+ "sebastian/diff": "~1.2",
754
+ "sebastian/exporter": "~1.2 || ~2.0"
755
+ },
756
+ "require-dev": {
757
+ "phpunit/phpunit": "~4.4"
758
+ },
759
+ "type": "library",
760
+ "extra": {
761
+ "branch-alias": {
762
+ "dev-master": "1.2.x-dev"
763
+ }
764
+ },
765
+ "autoload": {
766
+ "classmap": [
767
+ "src/"
768
+ ]
769
+ },
770
+ "notification-url": "https://packagist.org/downloads/",
771
+ "license": [
772
+ "BSD-3-Clause"
773
+ ],
774
+ "authors": [
775
+ {
776
+ "name": "Jeff Welch",
777
+ "email": "whatthejeff@gmail.com"
778
+ },
779
+ {
780
+ "name": "Volker Dusch",
781
+ "email": "github@wallbash.com"
782
+ },
783
+ {
784
+ "name": "Bernhard Schussek",
785
+ "email": "bschussek@2bepublished.at"
786
+ },
787
+ {
788
+ "name": "Sebastian Bergmann",
789
+ "email": "sebastian@phpunit.de"
790
+ }
791
+ ],
792
+ "description": "Provides the functionality to compare PHP values for equality",
793
+ "homepage": "http://www.github.com/sebastianbergmann/comparator",
794
+ "keywords": [
795
+ "comparator",
796
+ "compare",
797
+ "equality"
798
+ ],
799
+ "time": "2016-11-19T09:18:40+00:00"
800
+ },
801
+ {
802
+ "name": "sebastian/diff",
803
+ "version": "1.4.1",
804
+ "source": {
805
+ "type": "git",
806
+ "url": "https://github.com/sebastianbergmann/diff.git",
807
+ "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
808
+ },
809
+ "dist": {
810
+ "type": "zip",
811
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
812
+ "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
813
+ "shasum": ""
814
+ },
815
+ "require": {
816
+ "php": ">=5.3.3"
817
+ },
818
+ "require-dev": {
819
+ "phpunit/phpunit": "~4.8"
820
+ },
821
+ "type": "library",
822
+ "extra": {
823
+ "branch-alias": {
824
+ "dev-master": "1.4-dev"
825
+ }
826
+ },
827
+ "autoload": {
828
+ "classmap": [
829
+ "src/"
830
+ ]
831
+ },
832
+ "notification-url": "https://packagist.org/downloads/",
833
+ "license": [
834
+ "BSD-3-Clause"
835
+ ],
836
+ "authors": [
837
+ {
838
+ "name": "Kore Nordmann",
839
+ "email": "mail@kore-nordmann.de"
840
+ },
841
+ {
842
+ "name": "Sebastian Bergmann",
843
+ "email": "sebastian@phpunit.de"
844
+ }
845
+ ],
846
+ "description": "Diff implementation",
847
+ "homepage": "https://github.com/sebastianbergmann/diff",
848
+ "keywords": [
849
+ "diff"
850
+ ],
851
+ "time": "2015-12-08T07:14:41+00:00"
852
+ },
853
+ {
854
+ "name": "sebastian/environment",
855
+ "version": "1.3.8",
856
+ "source": {
857
+ "type": "git",
858
+ "url": "https://github.com/sebastianbergmann/environment.git",
859
+ "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
860
+ },
861
+ "dist": {
862
+ "type": "zip",
863
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
864
+ "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
865
+ "shasum": ""
866
+ },
867
+ "require": {
868
+ "php": "^5.3.3 || ^7.0"
869
+ },
870
+ "require-dev": {
871
+ "phpunit/phpunit": "^4.8 || ^5.0"
872
+ },
873
+ "type": "library",
874
+ "extra": {
875
+ "branch-alias": {
876
+ "dev-master": "1.3.x-dev"
877
+ }
878
+ },
879
+ "autoload": {
880
+ "classmap": [
881
+ "src/"
882
+ ]
883
+ },
884
+ "notification-url": "https://packagist.org/downloads/",
885
+ "license": [
886
+ "BSD-3-Clause"
887
+ ],
888
+ "authors": [
889
+ {
890
+ "name": "Sebastian Bergmann",
891
+ "email": "sebastian@phpunit.de"
892
+ }
893
+ ],
894
+ "description": "Provides functionality to handle HHVM/PHP environments",
895
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
896
+ "keywords": [
897
+ "Xdebug",
898
+ "environment",
899
+ "hhvm"
900
+ ],
901
+ "time": "2016-08-18T05:49:44+00:00"
902
+ },
903
+ {
904
+ "name": "sebastian/exporter",
905
+ "version": "1.2.2",
906
+ "source": {
907
+ "type": "git",
908
+ "url": "https://github.com/sebastianbergmann/exporter.git",
909
+ "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
910
+ },
911
+ "dist": {
912
+ "type": "zip",
913
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
914
+ "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
915
+ "shasum": ""
916
+ },
917
+ "require": {
918
+ "php": ">=5.3.3",
919
+ "sebastian/recursion-context": "~1.0"
920
+ },
921
+ "require-dev": {
922
+ "ext-mbstring": "*",
923
+ "phpunit/phpunit": "~4.4"
924
+ },
925
+ "type": "library",
926
+ "extra": {
927
+ "branch-alias": {
928
+ "dev-master": "1.3.x-dev"
929
+ }
930
+ },
931
+ "autoload": {
932
+ "classmap": [
933
+ "src/"
934
+ ]
935
+ },
936
+ "notification-url": "https://packagist.org/downloads/",
937
+ "license": [
938
+ "BSD-3-Clause"
939
+ ],
940
+ "authors": [
941
+ {
942
+ "name": "Jeff Welch",
943
+ "email": "whatthejeff@gmail.com"
944
+ },
945
+ {
946
+ "name": "Volker Dusch",
947
+ "email": "github@wallbash.com"
948
+ },
949
+ {
950
+ "name": "Bernhard Schussek",
951
+ "email": "bschussek@2bepublished.at"
952
+ },
953
+ {
954
+ "name": "Sebastian Bergmann",
955
+ "email": "sebastian@phpunit.de"
956
+ },
957
+ {
958
+ "name": "Adam Harvey",
959
+ "email": "aharvey@php.net"
960
+ }
961
+ ],
962
+ "description": "Provides the functionality to export PHP variables for visualization",
963
+ "homepage": "http://www.github.com/sebastianbergmann/exporter",
964
+ "keywords": [
965
+ "export",
966
+ "exporter"
967
+ ],
968
+ "time": "2016-06-17T09:04:28+00:00"
969
+ },
970
+ {
971
+ "name": "sebastian/global-state",
972
+ "version": "1.1.1",
973
+ "source": {
974
+ "type": "git",
975
+ "url": "https://github.com/sebastianbergmann/global-state.git",
976
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
977
+ },
978
+ "dist": {
979
+ "type": "zip",
980
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
981
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
982
+ "shasum": ""
983
+ },
984
+ "require": {
985
+ "php": ">=5.3.3"
986
+ },
987
+ "require-dev": {
988
+ "phpunit/phpunit": "~4.2"
989
+ },
990
+ "suggest": {
991
+ "ext-uopz": "*"
992
+ },
993
+ "type": "library",
994
+ "extra": {
995
+ "branch-alias": {
996
+ "dev-master": "1.0-dev"
997
+ }
998
+ },
999
+ "autoload": {
1000
+ "classmap": [
1001
+ "src/"
1002
+ ]
1003
+ },
1004
+ "notification-url": "https://packagist.org/downloads/",
1005
+ "license": [
1006
+ "BSD-3-Clause"
1007
+ ],
1008
+ "authors": [
1009
+ {
1010
+ "name": "Sebastian Bergmann",
1011
+ "email": "sebastian@phpunit.de"
1012
+ }
1013
+ ],
1014
+ "description": "Snapshotting of global state",
1015
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
1016
+ "keywords": [
1017
+ "global state"
1018
+ ],
1019
+ "time": "2015-10-12T03:26:01+00:00"
1020
+ },
1021
+ {
1022
+ "name": "sebastian/recursion-context",
1023
+ "version": "1.0.2",
1024
+ "source": {
1025
+ "type": "git",
1026
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
1027
+ "reference": "913401df809e99e4f47b27cdd781f4a258d58791"
1028
+ },
1029
+ "dist": {
1030
+ "type": "zip",
1031
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
1032
+ "reference": "913401df809e99e4f47b27cdd781f4a258d58791",
1033
+ "shasum": ""
1034
+ },
1035
+ "require": {
1036
+ "php": ">=5.3.3"
1037
+ },
1038
+ "require-dev": {
1039
+ "phpunit/phpunit": "~4.4"
1040
+ },
1041
+ "type": "library",
1042
+ "extra": {
1043
+ "branch-alias": {
1044
+ "dev-master": "1.0.x-dev"
1045
+ }
1046
+ },
1047
+ "autoload": {
1048
+ "classmap": [
1049
+ "src/"
1050
+ ]
1051
+ },
1052
+ "notification-url": "https://packagist.org/downloads/",
1053
+ "license": [
1054
+ "BSD-3-Clause"
1055
+ ],
1056
+ "authors": [
1057
+ {
1058
+ "name": "Jeff Welch",
1059
+ "email": "whatthejeff@gmail.com"
1060
+ },
1061
+ {
1062
+ "name": "Sebastian Bergmann",
1063
+ "email": "sebastian@phpunit.de"
1064
+ },
1065
+ {
1066
+ "name": "Adam Harvey",
1067
+ "email": "aharvey@php.net"
1068
+ }
1069
+ ],
1070
+ "description": "Provides functionality to recursively process PHP variables",
1071
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
1072
+ "time": "2015-11-11T19:50:13+00:00"
1073
+ },
1074
+ {
1075
+ "name": "sebastian/version",
1076
+ "version": "1.0.6",
1077
+ "source": {
1078
+ "type": "git",
1079
+ "url": "https://github.com/sebastianbergmann/version.git",
1080
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
1081
+ },
1082
+ "dist": {
1083
+ "type": "zip",
1084
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
1085
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
1086
+ "shasum": ""
1087
+ },
1088
+ "type": "library",
1089
+ "autoload": {
1090
+ "classmap": [
1091
+ "src/"
1092
+ ]
1093
+ },
1094
+ "notification-url": "https://packagist.org/downloads/",
1095
+ "license": [
1096
+ "BSD-3-Clause"
1097
+ ],
1098
+ "authors": [
1099
+ {
1100
+ "name": "Sebastian Bergmann",
1101
+ "email": "sebastian@phpunit.de",
1102
+ "role": "lead"
1103
+ }
1104
+ ],
1105
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
1106
+ "homepage": "https://github.com/sebastianbergmann/version",
1107
+ "time": "2015-06-21T13:59:46+00:00"
1108
+ },
1109
+ {
1110
+ "name": "squizlabs/php_codesniffer",
1111
+ "version": "2.7.0",
1112
+ "source": {
1113
+ "type": "git",
1114
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
1115
+ "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed"
1116
+ },
1117
+ "dist": {
1118
+ "type": "zip",
1119
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
1120
+ "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
1121
+ "shasum": ""
1122
+ },
1123
+ "require": {
1124
+ "ext-simplexml": "*",
1125
+ "ext-tokenizer": "*",
1126
+ "ext-xmlwriter": "*",
1127
+ "php": ">=5.1.2"
1128
+ },
1129
+ "require-dev": {
1130
+ "phpunit/phpunit": "~4.0"
1131
+ },
1132
+ "bin": [
1133
+ "scripts/phpcs",
1134
+ "scripts/phpcbf"
1135
+ ],
1136
+ "type": "library",
1137
+ "extra": {
1138
+ "branch-alias": {
1139
+ "dev-master": "2.x-dev"
1140
+ }
1141
+ },
1142
+ "autoload": {
1143
+ "classmap": [
1144
+ "CodeSniffer.php",
1145
+ "CodeSniffer/CLI.php",
1146
+ "CodeSniffer/Exception.php",
1147
+ "CodeSniffer/File.php",
1148
+ "CodeSniffer/Fixer.php",
1149
+ "CodeSniffer/Report.php",
1150
+ "CodeSniffer/Reporting.php",
1151
+ "CodeSniffer/Sniff.php",
1152
+ "CodeSniffer/Tokens.php",
1153
+ "CodeSniffer/Reports/",
1154
+ "CodeSniffer/Tokenizers/",
1155
+ "CodeSniffer/DocGenerators/",
1156
+ "CodeSniffer/Standards/AbstractPatternSniff.php",
1157
+ "CodeSniffer/Standards/AbstractScopeSniff.php",
1158
+ "CodeSniffer/Standards/AbstractVariableSniff.php",
1159
+ "CodeSniffer/Standards/IncorrectPatternException.php",
1160
+ "CodeSniffer/Standards/Generic/Sniffs/",
1161
+ "CodeSniffer/Standards/MySource/Sniffs/",
1162
+ "CodeSniffer/Standards/PEAR/Sniffs/",
1163
+ "CodeSniffer/Standards/PSR1/Sniffs/",
1164
+ "CodeSniffer/Standards/PSR2/Sniffs/",
1165
+ "CodeSniffer/Standards/Squiz/Sniffs/",
1166
+ "CodeSniffer/Standards/Zend/Sniffs/"
1167
+ ]
1168
+ },
1169
+ "notification-url": "https://packagist.org/downloads/",
1170
+ "license": [
1171
+ "BSD-3-Clause"
1172
+ ],
1173
+ "authors": [
1174
+ {
1175
+ "name": "Greg Sherwood",
1176
+ "role": "lead"
1177
+ }
1178
+ ],
1179
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
1180
+ "homepage": "http://www.squizlabs.com/php-codesniffer",
1181
+ "keywords": [
1182
+ "phpcs",
1183
+ "standards"
1184
+ ],
1185
+ "time": "2016-09-01T23:53:02+00:00"
1186
+ },
1187
+ {
1188
+ "name": "symfony/yaml",
1189
+ "version": "v2.8.14",
1190
+ "source": {
1191
+ "type": "git",
1192
+ "url": "https://github.com/symfony/yaml.git",
1193
+ "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff"
1194
+ },
1195
+ "dist": {
1196
+ "type": "zip",
1197
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff",
1198
+ "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff",
1199
+ "shasum": ""
1200
+ },
1201
+ "require": {
1202
+ "php": ">=5.3.9"
1203
+ },
1204
+ "type": "library",
1205
+ "extra": {
1206
+ "branch-alias": {
1207
+ "dev-master": "2.8-dev"
1208
+ }
1209
+ },
1210
+ "autoload": {
1211
+ "psr-4": {
1212
+ "Symfony\\Component\\Yaml\\": ""
1213
+ },
1214
+ "exclude-from-classmap": [
1215
+ "/Tests/"
1216
+ ]
1217
+ },
1218
+ "notification-url": "https://packagist.org/downloads/",
1219
+ "license": [
1220
+ "MIT"
1221
+ ],
1222
+ "authors": [
1223
+ {
1224
+ "name": "Fabien Potencier",
1225
+ "email": "fabien@symfony.com"
1226
+ },
1227
+ {
1228
+ "name": "Symfony Community",
1229
+ "homepage": "https://symfony.com/contributors"
1230
+ }
1231
+ ],
1232
+ "description": "Symfony Yaml Component",
1233
+ "homepage": "https://symfony.com",
1234
+ "time": "2016-11-14T16:15:57+00:00"
1235
+ }
1236
+ ],
1237
+ "aliases": [],
1238
+ "minimum-stability": "stable",
1239
+ "stability-flags": [],
1240
+ "prefer-stable": false,
1241
+ "prefer-lowest": false,
1242
+ "platform": {
1243
+ "php": "^5.4 || ^7.0"
1244
+ },
1245
+ "platform-dev": []
1246
+ }
vendor/facebook/facebook-instant-articles-sdk-php/tests/Facebook/InstantArticles/Transformer/CustomHTMLTransformerTest.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2016-present, Facebook, Inc.
4
+ * All rights reserved.
5
+ *
6
+ * This source code is licensed under the license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ namespace Facebook\InstantArticles\Transformer\CMS;
10
+
11
+ use Facebook\InstantArticles\Transformer\Transformer;
12
+ use Facebook\InstantArticles\Elements\InstantArticle;
13
+ use Facebook\InstantArticles\Elements\Header;
14
+ use Facebook\InstantArticles\Elements\Time;
15
+ use Facebook\InstantArticles\Elements\Author;
16
+
17
+ class CustomHTMLTransformerTest extends \PHPUnit_Framework_TestCase
18
+ {
19
+ protected function setUp()
20
+ {
21
+ \Logger::configure(
22
+ [
23
+ 'rootLogger' => [
24
+ 'appenders' => ['facebook-instantarticles-transformer']
25
+ ],
26
+ 'appenders' => [
27
+ 'facebook-instantarticles-transformer' => [
28
+ 'class' => 'LoggerAppenderConsole',
29
+ 'threshold' => 'INFO',
30
+ 'layout' => [
31
+ 'class' => 'LoggerLayoutSimple'
32
+ ]
33
+ ]
34
+ ]
35
+ ]
36
+ );
37
+ }
38
+
39
+ public function testTransformerCustomHTML()
40
+ {
41
+ $json_file = file_get_contents(__DIR__ . '/custom-html-rules.json');
42
+
43
+ $instant_article = InstantArticle::create();
44
+ $transformer = new Transformer();
45
+ $transformer->loadRules($json_file);
46
+
47
+ $html_file = file_get_contents(__DIR__ . '/custom.html');
48
+
49
+ libxml_use_internal_errors(true);
50
+ $document = new \DOMDocument();
51
+ $document->loadHTML($html_file);
52
+ libxml_use_internal_errors(false);
53
+
54
+ $instant_article
55
+ ->withCanonicalURL('http://localhost/article')
56
+ ->withHeader(
57
+ Header::create()
58
+ ->withTitle('Peace on <b>earth</b>')
59
+ ->addAuthor(Author::create()->withName('bill'))
60
+ ->withPublishTime(Time::create(Time::PUBLISHED)->withDatetime(
61
+ \DateTime::createFromFormat(
62
+ 'j-M-Y G:i:s',
63
+ '12-Apr-2016 19:46:51'
64
+ )
65
+ ))
66
+ );
67
+
68
+ $transformer->transform($instant_article, $document);
69
+ $instant_article->addMetaProperty('op:generator:version', '1.0.0');
70
+ $instant_article->addMetaProperty('op:generator:transformer:version', '1.0.0');
71
+ $result = $instant_article->render('', true)."\n";
72
+ $expected = file_get_contents(__DIR__ . '/custom-html-ia.xml');
73
+
74
+ $this->assertEquals($expected, $result);
75
+ // there must be 3 warnings related to <img> inside <li> that is not supported by IA
76
+ $this->assertEquals(3, count($transformer->getWarnings()));
77
+ }
78
+ }
vendor/facebook/facebook-instant-articles-sdk-php/tests/Facebook/InstantArticles/Transformer/custom-html-ia.xml ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <link rel="canonical" href="http://localhost/article"/>
4
+ <meta charset="utf-8"/>
5
+ <meta property="op:generator" content="facebook-instant-articles-sdk-php"/>
6
+ <meta property="op:generator:version" content="1.0.0"/>
7
+ <meta property="op:generator:transformer" content="facebook-instant-articles-sdk-php"/>
8
+ <meta property="op:generator:transformer:version" content="1.0.0"/>
9
+ <meta property="op:markup_version" content="v1.0"/>
10
+ </head>
11
+ <body>
12
+ <article>
13
+ <header>
14
+ <h1>Peace on &lt;b&gt;earth&lt;/b&gt;</h1>
15
+ <time class="op-published" datetime="2016-04-12T19:46:51+00:00">April 12th, 7:46pm</time>
16
+ <address><a>bill</a></address>
17
+ </header>
18
+ <p>Yes, peace is good for everybody!<br/>
19
+ Man kind.</p>
20
+ <figure>
21
+ <img src="http://example.com/image0.jpg"/>
22
+ </figure>
23
+ <p>Some text after img.</p>
24
+ <p>Some text before img</p>
25
+ <figure>
26
+ <img src="http://example.com/image1.jpg"/>
27
+ </figure>
28
+ <p>Some text before img</p>
29
+ <figure>
30
+ <img src="http://example.com/image2.jpg"/>
31
+ </figure>
32
+ <p> and some after img.</p>
33
+ <figure class="op-interactive">
34
+ <iframe src="http://example.com/0/" class="no-margin" width="300" height="200"></iframe>
35
+ </figure>
36
+ <p>Some text before iframe</p>
37
+ <figure class="op-interactive">
38
+ <iframe src="http://example.com/1/" class="no-margin" width="300" height="200"></iframe>
39
+ </figure>
40
+ <figure class="op-interactive">
41
+ <iframe src="http://example.com/2/" class="no-margin" width="300" height="200"></iframe>
42
+ </figure>
43
+ <p> some after iframe.</p>
44
+ <p>Some text before iframe</p>
45
+ <figure class="op-interactive">
46
+ <iframe src="http://example.com/3/" class="no-margin" width="300" height="200"></iframe>
47
+ </figure>
48
+ <p> and some after iframe.</p>
49
+ <figure class="op-interactive">
50
+ <iframe src="http://example.com/loose/with_url" class="no-margin" width="300" height="200"></iframe>
51
+ </figure>
52
+ <figure class="op-interactive">
53
+ <iframe class="no-margin">
54
+ <div>
55
+ <h1>Iframe loose without url</h1>
56
+ </div>
57
+ </iframe>
58
+ </figure>
59
+ <figure class="op-interactive">
60
+ <iframe class="no-margin">
61
+ <div>
62
+ <h1>some embed here</h1>
63
+ </div>
64
+ </iframe>
65
+ </figure>
66
+ <figure class="op-interactive">
67
+ <iframe class="no-margin">
68
+ <div>
69
+ <h1>some embed here</h1>
70
+ </div>
71
+ </iframe>
72
+ </figure>
73
+ <figure class="op-interactive">
74
+ <iframe class="no-margin">
75
+ <div>some content</div>
76
+ <script>alert('hi & hello to you @ testing!');</script></iframe>
77
+ </figure>
78
+ <figure class="op-interactive">
79
+ <iframe src="http://example.com/4/" class="no-margin" width="300" height="200"></iframe>
80
+ </figure>
81
+ <figure class="op-interactive">
82
+ <iframe class="no-margin">
83
+ <div>some content</div>
84
+ <script>alert('hi & hello to you @ testing!');</script></iframe>
85
+ </figure>
86
+ <figure class="op-interactive">
87
+ <iframe src="http://example.com/4/" class="no-margin" width="300" height="200"></iframe>
88
+ </figure>
89
+ <figure class="op-interactive">
90
+ <iframe class="no-margin">
91
+ <div>some content</div>
92
+ <script>alert('hi & hello to you @ testing!');</script></iframe>
93
+ </figure>
94
+ <figure class="op-interactive">
95
+ <iframe class="no-margin" height="200">
96
+ <table width="200" height="200">
97
+ <thead><td>header 1</td>
98
+ <td>header 2</td>
99
+ </thead>
100
+ <tbody>
101
+ <tr><td>Line 1 column 1</td>
102
+ <td>Line 1 column 2</td>
103
+ </tr>
104
+ <tr><td>Line 2 column 1</td>
105
+ <td>Line 2 column 2</td>
106
+ </tr>
107
+ </tbody>
108
+ </table>
109
+ </iframe>
110
+ </figure>
111
+ <ul>
112
+ <li>Some text on li before img</li>
113
+ <li>Some text on li before imgand after img</li>
114
+ <li>Some text after img</li>
115
+ </ul>
116
+ <figure class="op-slideshow">
117
+ <figure>
118
+ <img src="http://example.com/img0.jpg"/>
119
+ </figure>
120
+ <figure>
121
+ <img src="http://example.com/img1.jpg"/>
122
+ </figure>
123
+ <figure>
124
+ <img src="http://example.com/img2.jpg"/>
125
+ <figcaption>Image 2</figcaption>
126
+ </figure>
127
+ <figure>
128
+ <img src="http://example.com/img3.jpg"/>
129
+ <figcaption>Image 3</figcaption>
130
+ </figure>
131
+ <figure>
132
+ <img src="http://example.com/img4.jpg"/>
133
+ </figure>
134
+ </figure>
135
+ <figure class="op-slideshow">
136
+ <figure>
137
+ <img src="http://example.com/img1.jpg"/>
138
+ <figcaption> Image 1 </figcaption>
139
+ </figure>
140
+ <figure>
141
+ <img src="http://example.com/img2.jpg"/>
142
+ <figcaption> Image 2 </figcaption>
143
+ </figure>
144
+ <figure>
145
+ <img src="http://example.com/img3.jpg"/>
146
+ <figcaption> Image 3 </figcaption>
147
+ </figure>
148
+ </figure>
149
+ <figure class="op-interactive">
150
+ <iframe class="no-margin">
151
+ <blockquote class="instagram-media" data-instgrm-captioned="" data-instgrm-version="6" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);">
152
+ <div style="padding:8px;">
153
+ <div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:62.5% 0; text-align:center; width:100%;">
154
+ <div style=" background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAAGFBMVEUiIiI9PT0eHh4gIB4hIBkcHBwcHBwcHBydr+JQAAAACHRSTlMABA4YHyQsM5jtaMwAAADfSURBVDjL7ZVBEgMhCAQBAf//42xcNbpAqakcM0ftUmFAAIBE81IqBJdS3lS6zs3bIpB9WED3YYXFPmHRfT8sgyrCP1x8uEUxLMzNWElFOYCV6mHWWwMzdPEKHlhLw7NWJqkHc4uIZphavDzA2JPzUDsBZziNae2S6owH8xPmX8G7zzgKEOPUoYHvGz1TBCxMkd3kwNVbU0gKHkx+iZILf77IofhrY1nYFnB/lQPb79drWOyJVa/DAvg9B/rLB4cC+Nqgdz/TvBbBnr6GBReqn/nRmDgaQEej7WhonozjF+Y2I/fZou/qAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"></div>
155
+ </div>
156
+ <p style=" margin:8px 0 0 0; padding:0 4px;">
157
+ <a href="https://www.instagram.com/p/BAXbKP1POQe/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" target="_blank">📸 @natthaponwuttipetch</a>
158
+ </p>
159
+ <p style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;">
160
+ A photo posted by Ann Hathairat Vidhyaphum (@annvidh) on <time style=" font-family:Arial,sans-serif; font-size:14px; line-height:17px;" datetime="2016-01-10T16:56:06+00:00">Jan 10, 2016 at 8:56am PST</time></p>
161
+ </div>
162
+ </blockquote>
163
+ <script async="" defer="defer" src="//platform.instagram.com/en_US/embeds.js"></script>
164
+ </iframe>
165
+ </figure>
166
+ <figure>
167
+ <img src="http://example.com/img.jpg"/>
168
+ <figcaption>blue eyes</figcaption>
169
+ </figure>
170
+ <figure class="op-interactive">
171
+ <iframe class="no-margin">
172
+ <h1>Sibling content</h1>
173
+ <div>sibling body</div><script src="//sibling.com/brother.js"></script></iframe>
174
+ </figure>
175
+ <p>Standard paragraph that <b>shouldn't</b> lie within the interactive block.</p>
176
+ <figure class="op-interactive">
177
+ <iframe class="no-margin">
178
+ <p>Extra markup</p>
179
+ <div class="fb-post" data-href="https://www.facebook.com/some-page/posts/some-post"></div>
180
+ </iframe>
181
+ </figure>
182
+ <figure class="op-slideshow">
183
+ <figure>
184
+ <img src="http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy-810x471.jpg"/>
185
+ <figcaption>Caption Img 1</figcaption>
186
+ </figure>
187
+ <figure>
188
+ <img src="http://example.com/a-vot-chto-vnutri.jpg"/>
189
+ <figcaption>Alternative text </figcaption>
190
+ </figure>
191
+ <figure>
192
+ <img src="http://example.com/brelok-s-bezopasnostyu-vsegda-s-soboj.jpg"/>
193
+ <figcaption>Caption img 3</figcaption>
194
+ </figure>
195
+ </figure>
196
+ <figure>
197
+ <img src="http://example.com/image.jpg"/>
198
+ <figcaption>caption</figcaption>
199
+ </figure>
200
+ </article>
201
+ </body>
202
+ </html>
vendor/facebook/facebook-instant-articles-sdk-php/tests/Facebook/InstantArticles/Transformer/custom-html-rules.json ADDED
@@ -0,0 +1,606 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "rules":
3
+ [{
4
+ "class": "TextNodeRule"
5
+ }, {
6
+ "class": "PassThroughRule",
7
+ "selector": "html"
8
+ }, {
9
+ "class": "PassThroughRule",
10
+ "selector": "head"
11
+ }, {
12
+ "class": "PassThroughRule",
13
+ "selector": "body"
14
+ }, {
15
+ "class": "PassThroughRule",
16
+ "selector" : "code"
17
+ },{
18
+ "class": "PassThroughRule",
19
+ "selector" : "del"
20
+ },{
21
+ "class": "PassThroughRule",
22
+ "selector" : "mark"
23
+ }, {
24
+ "class": "PassThroughRule",
25
+ "selector" : "span"
26
+ }, {
27
+ "class": "ParagraphRule",
28
+ "selector": "p"
29
+ }, {
30
+ "class": "LineBreakRule",
31
+ "selector": "br"
32
+ }, {
33
+ "class": "AnchorRule",
34
+ "selector": "a",
35
+ "properties": {
36
+ "anchor.href": {
37
+ "type": "string",
38
+ "selector": "a",
39
+ "attribute": "href"
40
+ },
41
+ "anchor.rel": {
42
+ "type": "string",
43
+ "selector": "a",
44
+ "attribute": "rel"
45
+ }
46
+ }
47
+ }, {
48
+ "class": "BoldRule",
49
+ "selector": "b"
50
+ }, {
51
+ "class": "BoldRule",
52
+ "selector": "strong"
53
+ }, {
54
+ "class": "ItalicRule",
55
+ "selector": "i"
56
+ }, {
57
+ "class": "ItalicRule",
58
+ "selector": "em"
59
+ }, {
60
+ "class": "BlockquoteRule",
61
+ "selector": "blockquote"
62
+ }, {
63
+ "class": "PassThroughRule",
64
+ "selector": "blockquote p"
65
+ }, {
66
+ "class": "ImageInsideParagraphRule",
67
+ "selector": "img",
68
+ "properties": {
69
+ "image.url": {
70
+ "type": "string",
71
+ "selector": "img",
72
+ "attribute": "src"
73
+ }
74
+ }
75
+ },{
76
+ "class": "ImageRule",
77
+ "selector": "img",
78
+ "properties": {
79
+ "image.url": {
80
+ "type": "string",
81
+ "selector": "img",
82
+ "attribute": "src"
83
+ }
84
+ }
85
+ }, {
86
+ "class": "ListItemRule",
87
+ "selector" : "li"
88
+ }, {
89
+ "class": "ListElementRule",
90
+ "selector" : "ul"
91
+ }, {
92
+ "class": "ListElementRule",
93
+ "selector" : "ol"
94
+ }, {
95
+ "class": "BlockquoteRule",
96
+ "selector" : "blockquote"
97
+ }, {
98
+ "class": "H1Rule",
99
+ "selector" : "h1",
100
+ "properties" : {
101
+ "h1.class" : {
102
+ "type" : "string",
103
+ "selector" : "link",
104
+ "attribute": "class"
105
+ }
106
+ }
107
+ }, {
108
+ "class": "H1Rule",
109
+ "selector" : "title"
110
+ }, {
111
+ "class": "H2Rule",
112
+ "selector" : "h2",
113
+ "properties" : {
114
+ "h2.class" : {
115
+ "type" : "string",
116
+ "selector" : "link",
117
+ "attribute": "class"
118
+ }
119
+ }
120
+ }, {
121
+ "class": "H2Rule",
122
+ "selector" : "h3,h4,h5,h6"
123
+ }, {
124
+ "class": "InteractiveRule",
125
+ "selector" : "blockquote.instagram-media",
126
+ "properties" : {
127
+ "interactive.iframe" : {
128
+ "type" : "multiple",
129
+ "children": [
130
+ {
131
+ "type": "element",
132
+ "selector": "blockquote"
133
+ }, {
134
+ "type": "next-sibling-element-of",
135
+ "selector": "blockquote"
136
+ }
137
+ ]
138
+ }
139
+ }
140
+ }, {
141
+ "class": "InteractiveRule",
142
+ "selector" : "iframe",
143
+ "properties" : {
144
+ "interactive.url" : {
145
+ "type" : "string",
146
+ "selector" : "iframe",
147
+ "attribute": "src"
148
+ },
149
+ "interactive.width" : {
150
+ "type" : "int",
151
+ "selector" : "iframe",
152
+ "attribute": "width"
153
+ },
154
+ "interactive.height" : {
155
+ "type" : "int",
156
+ "selector" : "iframe",
157
+ "attribute": "height"
158
+ },
159
+ "interactive.iframe" : {
160
+ "type" : "children",
161
+ "selector" : "iframe"
162
+ }
163
+ }
164
+ }, {
165
+ "class": "InteractiveRule",
166
+ "selector" : "div.embed",
167
+ "properties" : {
168
+ "interactive.iframe" : {
169
+ "type" : "children",
170
+ "selector" : "div.embed"
171
+ },
172
+ "interactive.height" : {
173
+ "type" : "int",
174
+ "selector" : "iframe",
175
+ "attribute": "height"
176
+ },
177
+ "interactive.width" : {
178
+ "type" : "int",
179
+ "selector" : "iframe",
180
+ "attribute": "width"
181
+ }
182
+ }
183
+ }, {
184
+ "class": "InteractiveRule",
185
+ "selector" : "div.interactive",
186
+ "properties" : {
187
+ "interactive.iframe" : {
188
+ "type" : "children",
189
+ "selector" : "div.interactive"
190
+ },
191
+ "interactive.height" : {
192
+ "type" : "int",
193
+ "selector" : "iframe",
194
+ "attribute": "height"
195
+ },
196
+ "interactive.width" : {
197
+ "type" : "int",
198
+ "selector" : "iframe",
199
+ "attribute": "width"
200
+ }
201
+ }
202
+ }, {
203
+ "class": "InteractiveRule",
204
+ "selector" : "//div[@class='embed' and iframe]",
205
+ "properties" : {
206
+ "interactive.url" : {
207
+ "type" : "string",
208
+ "selector" : "iframe",
209
+ "attribute": "src"
210
+ },
211
+ "interactive.iframe" : {
212
+ "type" : "children",
213
+ "selector" : "iframe",
214
+ "attribute": "src"
215
+ },
216
+ "interactive.width" : {
217
+ "type" : "int",
218
+ "selector" : "iframe",
219
+ "attribute": "width"
220
+ },
221
+ "interactive.height" : {
222
+ "type" : "int",
223
+ "selector" : "iframe",
224
+ "attribute": "height"
225
+ }
226
+ }
227
+ }, {
228
+ "class": "InteractiveRule",
229
+ "selector" : "//div[@class='interactive' and iframe]",
230
+ "properties" : {
231
+ "interactive.url" : {
232
+ "type" : "string",
233
+ "selector" : "iframe",
234
+ "attribute": "src"
235
+ },
236
+ "interactive.iframe" : {
237
+ "type" : "children",
238
+ "selector" : "iframe"
239
+ },
240
+ "interactive.height" : {
241
+ "type" : "int",
242
+ "selector" : "iframe",
243
+ "attribute": "height"
244
+ },
245
+ "interactive.width" : {
246
+ "type" : "int",
247
+ "selector" : "iframe",
248
+ "attribute": "width"
249
+ }
250
+ }
251
+ }, {
252
+ "class": "InteractiveRule",
253
+ "selector" : "table",
254
+ "properties" : {
255
+ "interactive.iframe" : {
256
+ "type" : "element",
257
+ "selector" : "table"
258
+ },
259
+ "interactive.height" : {
260
+ "type" : "int",
261
+ "selector" : "table",
262
+ "attribute": "height"
263
+ },
264
+ "interactive.width" : {
265
+ "type" : "int",
266
+ "selector" : "iframe",
267
+ "attribute": "width"
268
+ }
269
+ }
270
+ }, {
271
+ "class": "InteractiveRule",
272
+ "selector" : "div.fb-post",
273
+ "properties" : {
274
+ "interactive.iframe" : {
275
+ "type": "multiple",
276
+ "children": [
277
+ {
278
+ "type": "fragment",
279
+ "fragment": "<p>Extra markup</p>"
280
+ },
281
+ {
282
+ "type" : "element",
283
+ "selector" : "div.fb-post"
284
+ }
285
+ ]
286
+ }
287
+ }
288
+ }, {
289
+ "class": "InteractiveInsideParagraphRule",
290
+ "selector" : "iframe",
291
+ "properties" : {
292
+ "interactive.url" : {
293
+ "type" : "string",
294
+ "selector" : "iframe",
295
+ "attribute": "src"
296
+ },
297
+ "interactive.height" : {
298
+ "type" : "int",
299
+ "selector" : "iframe",
300
+ "attribute": "height"
301
+ },
302
+ "interactive.width" : {
303
+ "type" : "int",
304
+ "selector" : "iframe",
305
+ "attribute": "width"
306
+ }
307
+ }
308
+ },{
309
+ "class": "InteractiveInsideParagraphRule",
310
+ "selector" : "div.embed",
311
+ "properties" : {
312
+ "interactive.iframe" : {
313
+ "type" : "children",
314
+ "selector" : "div.embed"
315
+ },
316
+ "interactive.height" : {
317
+ "type" : "int",
318
+ "selector" : "iframe",
319
+ "attribute": "height"
320
+ },
321
+ "interactive.width" : {
322
+ "type" : "int",
323
+ "selector" : "iframe",
324
+ "attribute": "width"
325
+ }
326
+ }
327
+ }, {
328
+ "class": "InteractiveInsideParagraphRule",
329
+ "selector" : "div.interactive",
330
+ "properties" : {
331
+ "interactive.iframe" : {
332
+ "type" : "children",
333
+ "selector" : "div.interactive"
334
+ },
335
+ "interactive.height" : {
336
+ "type" : "int",
337
+ "selector" : "iframe",
338
+ "attribute": "height"
339
+ },
340
+ "interactive.width" : {
341
+ "type" : "int",
342
+ "selector" : "iframe",
343
+ "attribute": "width"
344
+ }
345
+ }
346
+ }, {
347
+ "class": "InteractiveInsideParagraphRule",
348
+ "selector" : "//div[@class='embed' and iframe]",
349
+ "properties" : {
350
+ "interactive.url" : {
351
+ "type" : "string",
352
+ "selector" : "iframe",
353
+ "attribute": "src"
354
+ },
355
+ "interactive.iframe" : {
356
+ "type" : "children",
357
+ "selector" : "iframe",
358
+ "attribute": "src"
359
+ },
360
+ "interactive.width" : {
361
+ "type" : "int",
362
+ "selector" : "iframe",
363
+ "attribute": "width"
364
+ },
365
+ "interactive.height" : {
366
+ "type" : "int",
367
+ "selector" : "iframe",
368
+ "attribute": "height"
369
+ }
370
+ }
371
+ }, {
372
+ "class": "InteractiveInsideParagraphRule",
373
+ "selector" : "//div[@class='interactive' and iframe]",
374
+ "properties" : {
375
+ "interactive.url" : {
376
+ "type" : "string",
377
+ "selector" : "iframe",
378
+ "attribute": "src"
379
+ },
380
+ "interactive.iframe" : {
381
+ "type" : "children",
382
+ "selector" : "iframe",
383
+ "attribute": "src"
384
+ },
385
+ "interactive.height" : {
386
+ "type" : "int",
387
+ "selector" : "iframe",
388
+ "attribute": "height"
389
+ },
390
+ "interactive.width" : {
391
+ "type" : "int",
392
+ "selector" : "iframe",
393
+ "attribute": "width"
394
+ }
395
+ }
396
+ }, {
397
+ "class": "InteractiveInsideParagraphRule",
398
+ "selector" : "table",
399
+ "properties" : {
400
+ "interactive.iframe" : {
401
+ "type" : "element",
402
+ "selector" : "table"
403
+ },
404
+ "interactive.height" : {
405
+ "type" : "int",
406
+ "selector" : "table",
407
+ "attribute": "height"
408
+ },
409
+ "interactive.width" : {
410
+ "type" : "int",
411
+ "selector" : "table",
412
+ "attribute": "width"
413
+ }
414
+ }
415
+ }, {
416
+ "class": "SlideshowImageRule",
417
+ "selector" : "figure",
418
+ "properties" : {
419
+ "image.url" : {
420
+ "type" : "string",
421
+ "selector" : "img",
422
+ "attribute": "src"
423
+ },
424
+ "caption.title" : {
425
+ "type" : "string",
426
+ "selector" : "figcaption"
427
+ }
428
+ }
429
+ }, {
430
+ "class": "SlideshowRule",
431
+ "selector" : "div.gallery"
432
+ }, {
433
+ "class": "CaptionRule",
434
+ "selector" : "figcaption"
435
+ }, {
436
+ "class": "CaptionRule",
437
+ "selector" : "p.wp-caption-text"
438
+ }, {
439
+ "class": "ImageRule",
440
+ "selector" : "figure",
441
+ "properties" : {
442
+ "image.url" : {
443
+ "type" : "string",
444
+ "selector" : "img",
445
+ "attribute": "src"
446
+ }
447
+ }
448
+ }, {
449
+ "class": "VideoRule",
450
+ "selector" : "div.wp-video",
451
+ "containsChild": "video",
452
+ "properties" : {
453
+ "video.url" : {
454
+ "type" : "string",
455
+ "selector" : "source",
456
+ "attribute": "src"
457
+ },
458
+ "video.type" : {
459
+ "type" : "string",
460
+ "selector" : "source",
461
+ "attribute": "type"
462
+ }
463
+ }
464
+ },
465
+
466
+
467
+
468
+ {
469
+ "class" : "IgnoreRule",
470
+ "selector" : "p.jetpack-slideshow-noscript"
471
+ },
472
+ {
473
+ "class": "CaptionRule",
474
+ "selector" : "div.wp-caption-text"
475
+ },
476
+ {
477
+ "class" : "PassThroughRule",
478
+ "selector" : "div.gallery-row"
479
+ },
480
+ {
481
+ "class" : "PassThroughRule",
482
+ "selector" : "div.tiled-gallery p"
483
+ },
484
+ {
485
+ "class" : "PassThroughRule",
486
+ "selector" : "div.gallery-row p"
487
+ },
488
+ {
489
+ "class" : "PassThroughRule",
490
+ "selector" : "div.gallery-group p"
491
+ },
492
+ {
493
+ "class" : "PassThroughRule",
494
+ "selector" : "div.gallery-group"
495
+ },
496
+ {
497
+ "class": "ImageRule",
498
+ "selector" : "div.wp-caption",
499
+ "properties" : {
500
+ "image.url" : {
501
+ "type" : "string",
502
+ "selector" : "img",
503
+ "attribute": "src"
504
+ }
505
+ }
506
+ },
507
+ {
508
+ "class": "SlideshowImageRule",
509
+ "selector" : "div.tiled-gallery-item",
510
+ "properties" : {
511
+ "image.url" : {
512
+ "type" : "string",
513
+ "selector" : "img",
514
+ "attribute": "data-orig-file"
515
+ },
516
+ "caption.title" : {
517
+ "type" : "string",
518
+ "selector" : "div.tiled-gallery-caption"
519
+ }
520
+ }
521
+ },
522
+ {
523
+ "class": "SlideshowRule",
524
+ "selector" : "div.tiled-gallery"
525
+ },
526
+ {
527
+ "class": "SlideshowRule",
528
+ "selector" : "div.tiled-gallery"
529
+ },
530
+ {
531
+ "class": "Compat\\JetpackSlideshowRule",
532
+ "selector" : "div.jetpack-slideshow",
533
+ "properties": {
534
+ "jetpack.data-gallery": {
535
+ "type": "json",
536
+ "selector": "div.jetpack-slideshow",
537
+ "attribute": "data-gallery"
538
+ }
539
+ }
540
+ },
541
+ {
542
+ "class": "CaptionRule",
543
+ "selector" : "div.tiled-gallery-caption"
544
+ },
545
+ {
546
+ "class" : "PassThroughRule",
547
+ "selector" : "div.vce-gallery-big"
548
+ },
549
+ {
550
+ "class" : "PassThroughRule",
551
+ "selector" : "div.vce-gallery-small"
552
+ },
553
+ {
554
+ "class" : "IgnoreRule",
555
+ "selector" : "div.vce-gallery-slider"
556
+ },
557
+ {
558
+ "class": "SlideshowImageRule",
559
+ "selector" : "div.big-gallery-item",
560
+ "properties" : {
561
+ "image.url" : {
562
+ "type" : "string",
563
+ "selector" : "img",
564
+ "attribute": "src"
565
+ },
566
+ "caption.title" : {
567
+ "type" : "string",
568
+ "selector" : "figcaption.wp-caption-text"
569
+ }
570
+ }
571
+ },
572
+
573
+
574
+ {
575
+ "class": "ImageInsideParagraphRule",
576
+ "selector": "figure.wp-caption",
577
+ "properties": {
578
+ "image.url": {
579
+ "type": "string",
580
+ "selector": "img",
581
+ "attribute": "src"
582
+ }
583
+ }
584
+ },
585
+
586
+ {
587
+ "class": "InteractiveRule",
588
+ "selector" : "iframe.sibling",
589
+ "properties" : {
590
+ "interactive.iframe" : {
591
+ "type" : "multiple",
592
+ "children": [
593
+ {
594
+ "type": "children",
595
+ "selector": "iframe"
596
+ }, {
597
+ "type": "next-sibling-element-of",
598
+ "selector": "iframe",
599
+ "sibling.selector": "script"
600
+ }
601
+ ]
602
+ }
603
+ }
604
+ }
605
+ ]
606
+ }
vendor/facebook/facebook-instant-articles-sdk-php/tests/Facebook/InstantArticles/Transformer/custom.html ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <body>
4
+ <p>Yes, peace is good for everybody!<br>
5
+ Man kind.</p>
6
+ <p><img src="http://example.com/image0.jpg" />Some text after img.</p>
7
+ <p>Some text before img<img src="http://example.com/image1.jpg" /></p>
8
+ <p>Some text before img<img src="http://example.com/image2.jpg" /> and some after img.</p>
9
+ <p><iframe width="300" height="200" src="http://example.com/0/"/></p>
10
+ <p>Some text before iframe<iframe width="300" height="200" src="http://example.com/1/"/></p>
11
+ <p><iframe width="300" height="200" src="http://example.com/2/"></iframe> some after iframe.</p>
12
+ <p>Some text before iframe<iframe width="300" height="200" src="http://example.com/3/"/> and some after iframe.</p>
13
+ <iframe width="300" height="200" src="http://example.com/loose/with_url"></iframe>
14
+ <iframe>
15
+ <div>
16
+ <h1>Iframe loose without url</h1>
17
+ </div>
18
+ </iframe>
19
+ <div class="embed">
20
+ <div>
21
+ <h1>some embed here</h1>
22
+ </div>
23
+ </div>
24
+ <div class="interactive">
25
+ <div>
26
+ <h1>some embed here</h1>
27
+ </div>
28
+ </div>
29
+ <div class="interactive">
30
+ <iframe>
31
+ <div>some content</div>
32
+ <script>alert('hi & hello to you @ testing!');</script>
33
+ </iframe>
34
+ </div>
35
+ <div class="interactive">
36
+ <iframe width="300" height="200" src="http://example.com/4/"></iframe>
37
+ </div>
38
+ <div class="interactive">
39
+ <iframe>
40
+ <div>some content</div>
41
+ <script>alert('hi & hello to you @ testing!');</script>
42
+ </iframe>
43
+ </div>
44
+ <div class="embed">
45
+ <iframe width="300" height="200" src="http://example.com/4/"></iframe>
46
+ </div>
47
+ <div class="embed">
48
+ <iframe>
49
+ <div>some content</div>
50
+ <script>alert('hi & hello to you @ testing!');</script>
51
+ </iframe>
52
+ </div>
53
+ <table width="200" height="200">
54
+ <thead>
55
+ <td>header 1</td>
56
+ <td>header 2</td>
57
+ </thead>
58
+ <tbody>
59
+ <tr>
60
+ <td>Line 1 column 1</td>
61
+ <td>Line 1 column 2</td>
62
+ </tr>
63
+ <tr>
64
+ <td>Line 2 column 1</td>
65
+ <td>Line 2 column 2</td>
66
+ </tr>
67
+ </tbody>
68
+ </table>
69
+ <ul>
70
+ <li>Some text on li before img<img src="http://example.com/image.jpg" width="600" height="360"/></li>
71
+ <li>Some text on li before img<img src="http://example.com/image.jpg" width="600" height="360"/>and after img</li>
72
+ <li><img src="http://example.com/image.jpg" width="600" height="360"/>Some text after img</li>
73
+ </ul>
74
+ <p class="jetpack-slideshow-noscript robots-nocontent">This slideshow requires JavaScript.</p>
75
+ <div
76
+ class="slideshow-window jetpack-slideshow slideshow-black"
77
+ data-trans="fade" data-autostart="1"
78
+ data-gallery="[{&quot;src&quot;:&quot;http:\/\/example.com/img0.jpg&quot;,&quot;id&quot;:&quot;434&quot;,&quot;title&quot;:&quot;img0&quot;,&quot;alt&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;itemprop&quot;:&quot;image&quot;},{&quot;src&quot;:&quot;http:\/\/example.com\/img1.jpg&quot;,&quot;id&quot;:&quot;474&quot;,&quot;title&quot;:&quot;img1&quot;,&quot;alt&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;itemprop&quot;:&quot;image&quot;},{&quot;src&quot;:&quot;http:\/\/example.com\/img2.jpg&quot;,&quot;id&quot;:&quot;470&quot;,&quot;title&quot;:&quot;img2&quot;,&quot;alt&quot;:&quot;&quot;,&quot;caption&quot;:&quot;Image 2&quot;,&quot;itemprop&quot;:&quot;image&quot;},{&quot;src&quot;:&quot;http:\/\/example.com\/img3.jpg&quot;,&quot;id&quot;:&quot;466&quot;,&quot;title&quot;:&quot;Image 3&quot;,&quot;alt&quot;:&quot;&quot;,&quot;caption&quot;:&quot;Image 3&quot;,&quot;itemprop&quot;:&quot;image&quot;},{&quot;src&quot;:&quot;http:\/\/example.com\/img4.jpg&quot;,&quot;id&quot;:&quot;462&quot;,&quot;title&quot;:&quot;img4&quot;,&quot;alt&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;itemprop&quot;:&quot;image&quot;}]"
79
+ itemscope itemtype="http://schema.org/ImageGallery">
80
+ </div>
81
+
82
+ <div class="tiled-gallery type-rectangular tiled-gallery-unresized" >
83
+ <div class="gallery-row">
84
+ <div class="gallery-group images-1">
85
+ <div class="tiled-gallery-item tiled-gallery-item-large">
86
+ <a href="http://www.diegoquinteiro.com/15-razoes-para-ser-contra-o-impeachment/forum/">
87
+ <meta itemprop="width" content="318">
88
+ <meta itemprop="height" content="211">
89
+ <img data-orig-file="http://example.com/img1.jpg"
90
+ data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Forum" data-image-description="" data-medium-file="http://http://example.com/img1.jpg" data-large-file="http://example.com/img1.jpg" src="http://example.com/img1.jpg?resize=318%2C211"
91
+ width="318" height="211" data-original-width="318" data-original-height="211" title="Forum" alt="riots" style="width: 318px; height: 211px;" />
92
+ </a>
93
+ <div class="tiled-gallery-caption" itemprop="caption description"> Image 1 </div>
94
+ </p>
95
+ </div>
96
+ </p>
97
+ </div>
98
+ <p> <!-- close group -->
99
+ <div class="gallery-group images-2">
100
+ <div class="tiled-gallery-item tiled-gallery-item-small" itemprop="associatedMedia">
101
+ <a href="http://example.com/link" border="0" itemprop="url">
102
+ <meta itemprop="width" content="174">
103
+ <meta itemprop="height" content="109">
104
+ <img data-attachment-id="519" data-orig-file="http://example.com/img2.jpg" data-orig-size="2078,1310" data-comments-opened="" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Chaplin &#8211; Fábrica" data-image-description="" data-medium-file="http://example.com/img2.jpg" data-large-file="http://example.com/img2.jpg" src="http://example.com/img2.jpg?resize=174%2C109" width="174" height="109" data-original-width="174" data-original-height="109" itemprop="http://schema.org/image" title="Image Title" alt="chaplin" style="width: 174px; height: 109px;" />
105
+ </a>
106
+ <div class="tiled-gallery-caption" itemprop="caption description"> Image 2 </div>
107
+ </p>
108
+ </div>
109
+ <div class="tiled-gallery-item tiled-gallery-item-small" itemprop="associatedMedia">
110
+ <a href="http://example.com/link" border="0" itemprop="url">
111
+ <meta itemprop="width" content="174">
112
+ <meta itemprop="height" content="98">
113
+ <img data-attachment-id="532" data-orig-file="http://example.com/img3.jpg" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="highlight image" data-image-description="" data-medium-file="http://www.diegoquinteiro.com/wp-content/uploads/2016/06/highlight-image-300x169.jpg" data-large-file="http://www.diegoquinteiro.com/wp-content/uploads/2016/06/highlight-image-1024x576.jpg" src="http://i1.wp.com/www.diegoquinteiro.com/wp-content/uploads/2016/06/highlight-image.jpg?resize=174%2C98" width="174" height="98" data-original-width="174" data-original-height="98" itemprop="http://schema.org/image" title="highlight image" alt="Dog cat" style="width: 174px; height: 98px;" />
114
+ </a>
115
+ <div class="tiled-gallery-caption" itemprop="caption description"> Image 3 </div>
116
+ </p>
117
+ </div>
118
+ </p>
119
+ </div>
120
+ <p> <!-- close group -->
121
+ </div>
122
+ <p> <!-- close row -->
123
+ </div>
124
+ <blockquote class="instagram-media" data-instgrm-captioned data-instgrm-version="6" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);">
125
+ <div style="padding:8px;">
126
+ <div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:62.5% 0; text-align:center; width:100%;">
127
+ <div style=" background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAAGFBMVEUiIiI9PT0eHh4gIB4hIBkcHBwcHBwcHBydr+JQAAAACHRSTlMABA4YHyQsM5jtaMwAAADfSURBVDjL7ZVBEgMhCAQBAf//42xcNbpAqakcM0ftUmFAAIBE81IqBJdS3lS6zs3bIpB9WED3YYXFPmHRfT8sgyrCP1x8uEUxLMzNWElFOYCV6mHWWwMzdPEKHlhLw7NWJqkHc4uIZphavDzA2JPzUDsBZziNae2S6owH8xPmX8G7zzgKEOPUoYHvGz1TBCxMkd3kwNVbU0gKHkx+iZILf77IofhrY1nYFnB/lQPb79drWOyJVa/DAvg9B/rLB4cC+Nqgdz/TvBbBnr6GBReqn/nRmDgaQEej7WhonozjF+Y2I/fZou/qAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"></div>
128
+ </div>
129
+ <p style=" margin:8px 0 0 0; padding:0 4px;">
130
+ <a href="https://www.instagram.com/p/BAXbKP1POQe/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" target="_blank">📸 @natthaponwuttipetch</a>
131
+ </p>
132
+ <p style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;">
133
+ A photo posted by Ann Hathairat Vidhyaphum (@annvidh) on <time style=" font-family:Arial,sans-serif; font-size:14px; line-height:17px;" datetime="2016-01-10T16:56:06+00:00">Jan 10, 2016 at 8:56am PST</time>
134
+ </p>
135
+ </div>
136
+ </blockquote>
137
+ <script async defer src="//platform.instagram.com/en_US/embeds.js"></script>
138
+ <p>
139
+ <figure style="width: 1280px" class="wp-caption alignnone">
140
+ <img src="http://example.com/img.jpg" width="1280" height="740" class />
141
+ <br />
142
+ <figcaption class="wp-caption-text">blue eyes</figcaption>
143
+ </figure>
144
+ </p>
145
+ <iframe class="sibling">
146
+ <h1>Sibling content</h1>
147
+ <div>sibling body</div></iframe>
148
+ <script src="//sibling.com/brother.js"></script>
149
+ <p>Standard paragraph that <b>shouldn't</b> lie within the interactive block.</p>
150
+ <div class="fb-post" data-href="https://www.facebook.com/some-page/posts/some-post"></div>
151
+
152
+ <div id="gallery-3" class="vce-gallery gallery galleryid-15219 gallery-columns-3 gallery-size-vce-lay-b">
153
+ <div class="vce-gallery-big">
154
+ <div class="big-gallery-item item-0">
155
+ <div class="gallery-icon">
156
+ <a href="http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy.jpg"><img width="810" height="471" src="http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy-810x471.jpg" class="attachment-vce-lay-a size-vce-lay-a" alt="Caption Img 1" srcset="http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy-810x471.jpg 810w, http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy-300x174.jpg 300w, http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy-768x447.jpg 768w, http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy.jpg 860w" sizes="(max-width: 810px) 100vw, 810px"></a>
157
+ </div>
158
+ <figcaption class="wp-caption-text gallery-caption">Caption Img 1</figcaption>
159
+ </div>
160
+ <div class="big-gallery-item item-1" style="display:none;">
161
+ <div class="gallery-icon">
162
+ <a href="http://example.com/a-vot-chto-vnutri.jpg">
163
+ <img width="699" height="443" src="http://example.com/a-vot-chto-vnutri.jpg" class="attachment-vce-lay-a size-vce-lay-a" alt="Alternative text" srcset="http://example.com/a-vot-chto-vnutri.jpg 699w, http://example.com/a-vot-chto-vnutri-300x190.jpg 300w" sizes="(max-width: 699px) 100vw, 699px">
164
+ </a>
165
+ </div>
166
+ <figcaption class="wp-caption-text gallery-caption">Alternative text </figcaption>
167
+ </div>
168
+ <div class="big-gallery-item item-2" style="display:none;">
169
+ <div class="gallery-icon">
170
+ <a href="http://example.com/brelok-s-bezopasnostyu-vsegda-s-soboj.jpg">
171
+ <img width="700" height="467" src="http://example.com/brelok-s-bezopasnostyu-vsegda-s-soboj.jpg" class="attachment-vce-lay-a size-vce-lay-a" alt="Caption img 3" srcset="http://example.com/brelok-s-bezopasnostyu-vsegda-s-soboj.jpg 700w, http://example.com/brelok-s-bezopasnostyu-vsegda-s-soboj-300x200.jpg 300w" sizes="(max-width: 700px) 100vw, 700px">
172
+ </a>
173
+ </div>
174
+ <figcaption class="wp-caption-text gallery-caption">Caption img 3</figcaption>
175
+ </div>
176
+ </div>
177
+ <div class="vce-gallery-slider owl-carousel owl-theme owl-loaded owl-text-select-on" data-columns="3">
178
+ <div class="owl-stage-outer">
179
+ <div class="owl-stage" style="transform: translate3d(-761px, 0px, 0px); transition: 0s; width: 3551.34px;">
180
+ <div class="owl-item active" style="width: 252.667px; margin-right: 1px;">
181
+ <figure class="gallery-item" data-item="0">
182
+ <div class="gallery-icon landscape">
183
+ <a href="http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy.jpg"><img width="375" height="195" src="http://example.com/konservnye-banki-osobenno-lyubyat-yaponcy-375x195.jpg" class="attachment-vce-lay-b size-vce-lay-b" alt="Caption Img 1"></a>
184
+ </div>
185
+ </figure>
186
+ </div>
187
+ <div class="owl-item active" style="width: 252.667px; margin-right: 1px;">
188
+ <figure class="gallery-item" data-item="1">
189
+ <div class="gallery-icon landscape">
190
+ <a href="http://example.com/a-vot-chto-vnutri.jpg"><img width="375" height="195" src="http://example.com/a-vot-chto-vnutri-375x195.jpg" class="attachment-vce-lay-b size-vce-lay-b" alt="Alternative text"></a>
191
+ </div>
192
+ </figure>
193
+ </div>
194
+ <div class="owl-item active" style="width: 252.667px; margin-right: 1px;">
195
+ <figure class="gallery-item" data-item="2">
196
+ <div class="gallery-icon landscape">
197
+ <a href="http://example.com/brelok-s-bezopasnostyu-vsegda-s-soboj.jpg"><img width="375" height="195" src="http://example.com/brelok-s-bezopasnostyu-vsegda-s-soboj-375x195.jpg" class="attachment-vce-lay-b size-vce-lay-b" alt="Caption img 3"></a>
198
+ </div>
199
+ </figure>
200
+ </div>
201
+ </div>
202
+ </div>
203
+ <div class="owl-controls">
204
+ <div class="owl-nav">
205
+ <div class="owl-prev" style=""><i class="fa fa-angle-left"></i></div>
206
+ <div class="owl-next" style=""><i class="fa fa-angle-right"></i></div>
207
+ </div>
208
+ <div class="owl-dots" style="">
209
+ <div class="owl-dot active"><span></span></div>
210
+ <div class="owl-dot"><span></span></div>
211
+ <div class="owl-dot"><span></span></div>
212
+ </div>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <div id="attachment_22553" style="width: 800px" class="wp-caption alignnone">
217
+ <img class="wp-image-22553 size-large" src="http://example.com/image.jpg" alt="alt text" width="800" height="552" srcset="http://example.com/image-800.jpg 800w, http://example.com/image-400.jpg 400w, http://example.com/image-768.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" />
218
+ <p class="wp-caption-text">caption</p>
219
+ </div>
220
+ </body>
221
+ </html>