Skip to content

Commit

Permalink
Synced to 7817e0b
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Jan 17, 2018
1 parent 4245b70 commit 3006355
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "s9e/text-formatter",
"version": "1.0.0",
"version": "1.0.1",
"type": "library",
"description": "Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding media (YouTube, etc...), enhanced typography and more.",
"homepage": "https://github.com/s9e/TextFormatter/",
Expand All @@ -16,7 +16,7 @@
"php": ">=5.4.7",
"matthiasmullie/minify": "*",
"php-coveralls/php-coveralls": "*",
"s9e/regexp-builder": ">=1.3.0"
"s9e/regexp-builder": "1.*"
},
"suggest": {
"ext-curl": "Improves the performance of the MediaEmbed plugin and some JavaScript minifiers",
Expand Down
2 changes: 1 addition & 1 deletion src/Bundles/MediaPack.php

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/Bundles/MediaPack/Renderer.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ function outputText(catchupPos, maxLines, closeParagraph)
// If the catchup text is not entirely composed of whitespace, we put it inside ignore tags
if (!/^[ \n\t]*$/.test(catchupText))
{
catchupText = '<i>' + catchupText + '</i>';
catchupText = '<i>' + htmlspecialchars_noquotes(catchupText) + '</i>';
}

output += catchupText;
Expand Down
2 changes: 1 addition & 1 deletion src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ protected function outputText($catchupPos, $maxLines, $closeParagraph)
$catchupLen = $catchupPos - $this->pos;
$catchupText = \substr($this->text, $this->pos, $catchupLen);
if (\strspn($catchupText, " \n\t") < $catchupLen)
$catchupText = '<i>' . $catchupText . '</i>';
$catchupText = '<i>' . \htmlspecialchars($catchupText, \ENT_NOQUOTES, 'UTF-8') . '</i>';
$this->output .= $catchupText;
$this->pos = $catchupPos;
if ($closeParagraph)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class CachedDefinitionCollection extends SiteDefinitionCollection
'flickr'=>['attributes'=>[],'example'=>['https://www.flickr.com/photos/8757881@N04/2971804544/lightbox/','https://flic.kr/8757881@N04/2971804544','https://flic.kr/p/5wBgXo'],'extract'=>['@flickr\\.com/photos/[^/]+/(?\'id\'\\d+)@','@flic\\.kr/(?!p/)[^/]+/(?\'id\'\\d+)@'],'homepage'=>'https://www.flickr.com/','host'=>['flic.kr','flickr.com'],'iframe'=>['height'=>500,'src'=>'https://www.flickr.com/photos/_/{@id}/player/','width'=>500],'name'=>'Flickr','scrape'=>[['extract'=>['@flickr\\.com/photos/[^/]+/(?\'id\'\\d+)@'],'match'=>['@flic\\.kr/p/(?\'short\'\\w+)@'],'url'=>'https://www.flickr.com/photo.gne?rb=1&short={@short}']],'tags'=>['images']],
'foratv'=>['attributes'=>[],'example'=>'http://fora.tv/2014/09/30/How_Google_Works','extract'=>[],'homepage'=>'http://fora.tv/','host'=>['fora.tv'],'iframe'=>['src'=>'//library.fora.tv/embed?id={@id}&type=c'],'name'=>'FORA.tv','scrape'=>[['extract'=>['!embed\\?id=(?\'id\'\\d+)!'],'match'=>['!fora\\.tv/\\d+/\\d+/\\d+/.!']]]],
'foxnews'=>['attributes'=>[],'example'=>'http://video.foxnews.com/v/3592758613001/reddit-helps-fund-homemade-hot-sauce-venture/','extract'=>['!video\\.foxnews\\.com/v/(?\'id\'\\d+)!'],'homepage'=>'http://www.foxnews.com/','host'=>['video.foxnews.com'],'iframe'=>['src'=>'//video.foxnews.com/v/video-embed.html?video_id={@id}'],'name'=>'Fox News','scrape'=>[],'tags'=>['news']],
'foxsports'=>['attributes'=>[],'example'=>'https://www.foxsports.com/home/video/1132379203958','extract'=>[],'homepage'=>'https://www.foxsports.com/video','host'=>['foxsports.com'],'iframe'=>['src'=>'//player.foxfdm.com/sports/embed-iframe.html?videourl=http://link.theplatform.com/s/BKQ29B/{@id}?mbr=true&assetTypes=Video&feed=Fox%20Sports%20All&autoplay=false&policy=68249219&sdk=PDK%205.7.15'],'name'=>'FOX Sports','scrape'=>[['extract'=>['@BKQ29B/(?\'id\'\\w+)@'],'match'=>['@/video/\\d@']]],'tags'=>['sports']],
'funnyordie'=>['attributes'=>[],'example'=>'http://www.funnyordie.com/videos/bf313bd8b4/murdock-with-keith-david','extract'=>['!funnyordie\\.com/videos/(?\'id\'[0-9a-f]+)!'],'homepage'=>'http://www.funnyordie.com/','host'=>['funnyordie.com'],'iframe'=>['src'=>'//www.funnyordie.com/embed/{@id}'],'name'=>'Funny or Die','scrape'=>[],'source'=>'http://support.funnyordie.com/discussions/problems/918-embed-user-videos-widget','tags'=>['entertainment']],
'gamespot'=>['attributes'=>[],'example'=>['http://www.gamespot.com/destiny/videos/destiny-the-moon-trailer-6415176/','http://www.gamespot.com/events/game-crib-tsm-snapdragon/gamecrib-extras-cooking-with-dan-dinh-6412922/','http://www.gamespot.com/videos/beat-the-pros-pax-prime-2013/2300-6414307/'],'extract'=>['!gamespot\\.com.*?/(?:events|videos)/.*?-(?\'id\'\\d+)/(?:[#?].*)?$!'],'homepage'=>'http://www.gamespot.com/','host'=>['gamespot.com'],'iframe'=>['height'=>400,'src'=>'//www.gamespot.com/videos/embed/{@id}/','width'=>640],'name'=>'Gamespot','scrape'=>[],'tags'=>['gaming']],
'gametrailers'=>['attributes'=>[],'example'=>'http://www.gametrailers.com/videos/view/pop-fiction/102300-Metal-Gear-Solid-3-Still-in-a-Dream','extract'=>[],'homepage'=>'http://www.gametrailers.com/','host'=>['gametrailers.com'],'iframe'=>['src'=>'//<xsl:choose><xsl:when test="starts-with(@id,\'mgid:\')">media.mtvnservices.com/embed/<xsl:value-of select="@id"/></xsl:when><xsl:otherwise>embed.gametrailers.com/embed/<xsl:value-of select="@id"/>?embed=1&amp;suppressBumper=1</xsl:otherwise></xsl:choose>'],'name'=>'GameTrailers','scrape'=>[['extract'=>['!embed/(?\'id\'\\d+)!'],'match'=>['!gametrailers\\.com/(?:full-episode|review|video)s/!']]],'tags'=>['gaming']],
Expand Down

0 comments on commit 3006355

Please sign in to comment.