From a025c6e112a6db604915889bdb98fe5cc4f46d9c Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Tue, 23 Jul 2024 12:01:47 +0200 Subject: [PATCH] Updated dependencies --- README.md | 2 +- docs/Plugins/BBCodes/Add_from_the_repository.md | 10 +++++----- docs/testdox.txt | 1 - src/Bundles/Forum.php | 2 +- src/Bundles/Forum/Renderer.php | 4 ++-- src/Plugins/BBCodes/Configurator/repository.xml | 8 ++++---- tests/Bundles/data/Forum/016.html | 2 +- tests/Bundles/data/Forum/017.html | 4 ++-- tests/Bundles/data/Forum/026.html | 2 +- tests/Plugins/BBCodes/BBCodesTest.php | 8 ++++---- 10 files changed, 21 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index eb91897c4..f0fe49824 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,6 @@ You can try the JavaScript version in this [BBCodes + other stuff demo](https:// The following tools are used during development. - - [phpunit/phpunit](https://phpunit.de/) 9.6.19 runs a full suite of tests before every commit. + - [phpunit/phpunit](https://phpunit.de/) 9.6.20 runs a full suite of tests before every commit. - [code-lts/doctum](https://github.com/code-lts/doctum) 5.5.4 generates the [API docs](https://s9e.github.io/TextFormatter/api/). - Scrutinizer is used for code tracking. diff --git a/docs/Plugins/BBCodes/Add_from_the_repository.md b/docs/Plugins/BBCodes/Add_from_the_repository.md index 91483f9bd..7f4c394cd 100644 --- a/docs/Plugins/BBCodes/Add_from_the_repository.md +++ b/docs/Plugins/BBCodes/Add_from_the_repository.md @@ -117,14 +117,14 @@ array ( github - + - https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/ + https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.10.0/build/ if(window['hljsLoader'])this.parentNode.removeChild(this) - sha384-E9ssooeJ4kPel3JD7st0BgS50OLWFEdg4ZOp8lYPy52ctQazOIV37TCvzV8l4cYG - https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.34/loader.min.js + sha384-BVsWQNRIIoz5p+TboZLw6oEKZjhdp1/cTXJOM22filkkMTKXRC8l7s2g9+rA3eoA + https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.35/loader.min.js ``` @@ -141,7 +141,7 @@ array ( url - https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/ + https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.10.0/build/ highlight.js CDN URL diff --git a/docs/testdox.txt b/docs/testdox.txt index a7f8488cf..64cf2b461 100644 --- a/docs/testdox.txt +++ b/docs/testdox.txt @@ -6888,7 +6888,6 @@ Parser (s9e\TextFormatter\Tests\Plugins\MediaEmbed\Parser) [x] Scraping tests with data set #52 [x] Scraping tests with data set #53 [x] Scraping tests with data set #54 - [x] Scraping tests with data set #55 [x] Scraping+rendering tests with data set #0 [x] Scraping+rendering tests with data set #1 [x] Scraping+rendering tests with data set #2 diff --git a/src/Bundles/Forum.php b/src/Bundles/Forum.php index a6a1a6655..ca1e27911 100644 --- a/src/Bundles/Forum.php +++ b/src/Bundles/Forum.php @@ -26,7 +26,7 @@ public static function getJS(): string { return '(function(){const r=[""],aa=[0,257],ba=["","t"],t=["","id"],ca={flags:2},u=[128,256],da=["","type"],v=[65431,257],ea=[65413,257],fa={flags:514},ha=[27395,257],ia=[65288,257],x={flags:3089},ja=["","album_id"],ka=["","track_id"],la=["","type","id"],ma=["","playlist_id"],na=["","user","type","id"],oa=["","channel","clip_id"],z={c:[],p:!1},A={B:1,COLOR:1,EMAIL:1,FONT:1,I:1,S:1,SIZE:1,U:1,URL:1},F=[function(a,b){let c={},d;for(d in b.b){let n=b.b[d];var h=!1;if(d in a.b){h=n.c;var g=d,m=a.b[d];C.j=g;for(let f=0;f< h.length&&(m=h[f](m,g),!1!==m);++f);delete C.j;h=m}!1!==h?c[d]=h:n.p&&D(a)}E(a,c)}],qa=[function(a){return pa(a,/^[-0-9A-Za-z_]+$/)}],ra={c:[function(a){let b=/^(?=\\d)(?:(\\d+)h)?(?:(\\d+)m)?(?:(\\d+)s)?$/.exec(a);return b?3600*(b[1]||0)+60*(b[2]||0)+(+b[3]||0):/^(?:0|[1-9]\\d*)$/.test(a)?a:!1}],p:!1},sa={c:[function(a){return/^(?:0|[1-9]\\d*)$/.test(a)?a:!1}],p:!1},ta={r:A,flags:260,s:A},ua={r:A,flags:3460,s:A},va={c:qa,p:!1},wa={c:qa,p:!0},Aa={c:[function(a){{var b=H.urlConfig,c=C;let d=xa(a.replace(/^\\s+/, -"").replace(/\\s+$/,""));(b=ya(b,d))?(c&&(d.attrValue=a,c.add("err",b,d)),a=!1):a=za(d)}return a}],p:!0},Ba={e:ea,b:{},k:0,c:F,f:10,d:ca,g:5E3},J={e:u,b:{id:z},k:2,c:F,f:10,d:x,g:5E3},Ca={e:ia,b:{},k:1,c:F,f:10,d:ua,g:5E3},Da={e:v,b:{align:{c:[function(a){return a.toLowerCase()},function(a){return pa(a,/^(?:center|justify|left|right)$/)}],p:!1},colspan:sa,rowspan:sa},k:5,c:F,f:10,d:{r:{B:1,COLOR:1,EMAIL:1,FONT:1,I:1,S:1,SIZE:1,TD:1,TH:1,U:1,URL:1},flags:256,s:A},g:5E3},Ea=\'HideShowSpoilerwrote:$cB|I|LI|OL|S|TABLE|TR|U|UL|p">$g$f$cBANDCAMP"><$y$ibandcamp"$j$e400px"><$y$j$b100%"><$v$k"$o$z$mno"$j$d><$l$qsrc">//bandcamp.com/EmbeddedPlayer/size=large/minimal=true/<$t><$u$n@album_id">album=$a@album_id"/><$w$n@track_num">/t=$a@track_num"/><$r>track=$a@track_id"/><$w$n$MEDIAEMBED_THEME=\\\'dark\\\'">/bgcol=333333/linkcol=0f91ff$f$cCENTER">$g$f$cCODE">
<$w$n@lang"><$l$qclass">language-$a@lang"/>$g
';break;case'COLOR':$this->out.='';$this->at($node);$this->out.='';break;case'DAILYMOTION':$this->out.='';break;case'EMAIL':$this->out.='';$this->at($node);$this->out.='';break;case'EMOJI':$this->out.=''.htmlspecialchars($node->textContent,2).'';break;case'FACEBOOK':$this->out.='';break;case'FONT':$this->out.='';$this->at($node);$this->out.='';break;case'I':$this->out.='';$this->at($node);$this->out.='';break;case'IMG':$this->out.=''.htmlspecialchars($node->getAttribute('alt'),2).'hasAttribute('height'))$this->out.=' height="'.htmlspecialchars($node->getAttribute('height'),2).'"';if($node->hasAttribute('width'))$this->out.=' width="'.htmlspecialchars($node->getAttribute('width'),2).'"';$this->out.='>';break;case'INDIEGOGO':$this->out.='';break;case'INSTAGRAM':$this->out.='';break;case'KICKSTARTER':$this->out.='hasAttribute('video'))$this->out.=' style="display:inline-block;width:100%;max-width:640px">';else$this->out.=' style="display:inline-block;width:100%;max-width:220px">';$this->out.='';break;case'LI':$this->out.='
  • ';$this->at($node);$this->out.='
  • ';break;case'LIST':if(!$node->hasAttribute('type')){$this->out.='
      ';$this->at($node);$this->out.='
    ';}elseif(str_starts_with($node->getAttribute('type'),'decimal')||str_starts_with($node->getAttribute('type'),'lower')||str_starts_with($node->getAttribute('type'),'upper')){$this->out.='
      hasAttribute('start'))$this->out.=' start="'.htmlspecialchars($node->getAttribute('start'),2).'"';$this->out.='>';$this->at($node);$this->out.='
    ';}else{$this->out.='
      ';$this->at($node);$this->out.='
    ';}break;case'LIVELEAK':$this->out.='';break;case'OL':$this->out.='
      ';$this->at($node);$this->out.='
    ';break;case'QUOTE':$this->out.='hasAttribute('author'))$this->out.=' class="uncited"';$this->out.='>
    ';if($node->hasAttribute('author'))$this->out.=''.htmlspecialchars($node->getAttribute('author'),0).' '.htmlspecialchars($this->params['L_WROTE'],0).'';$this->at($node);$this->out.='
    ';break;case'S':$this->out.='';$this->at($node);$this->out.='';break;case'SIZE':$this->out.='';$this->at($node);$this->out.='';break;case'SOUNDCLOUD':$this->out.='';break;case'SPOILER':$this->out.='
    '.htmlspecialchars($this->params['L_SPOILER'],0).' '.htmlspecialchars($node->getAttribute('title'),0).'
    ';$this->at($node);$this->out.='
    ';break;case'TABLE':$this->out.='';$this->at($node);$this->out.='
    ';break;case'TD':$this->out.='hasAttribute('colspan'))$this->out.=' colspan="'.htmlspecialchars($node->getAttribute('colspan'),2).'"';if($node->hasAttribute('rowspan'))$this->out.=' rowspan="'.htmlspecialchars($node->getAttribute('rowspan'),2).'"';if($node->hasAttribute('align'))$this->out.=' style="text-align:'.htmlspecialchars($node->getAttribute('align'),2).'"';$this->out.='>';$this->at($node);$this->out.='';break;case'TH':$this->out.='hasAttribute('colspan'))$this->out.=' colspan="'.htmlspecialchars($node->getAttribute('colspan'),2).'"';if($node->hasAttribute('rowspan'))$this->out.=' rowspan="'.htmlspecialchars($node->getAttribute('rowspan'),2).'"';if($node->hasAttribute('align'))$this->out.=' style="text-align:'.htmlspecialchars($node->getAttribute('align'),2).'"';$this->out.='>';$this->at($node);$this->out.='';break;case'TR':$this->out.='';$this->at($node);$this->out.='';break;case'TWITCH':$this->out.='';break;case'TWITTER':$this->out.='';break;case'U':$this->out.='';$this->at($node);$this->out.='';break;case'UL':$this->out.='
      ';$this->at($node);$this->out.='
    ';break;case'URL':$this->out.='hasAttribute('title'))$this->out.=' title="'.htmlspecialchars($node->getAttribute('title'),2).'"';$this->out.='>';$this->at($node);$this->out.='';break;case'VIMEO':$this->out.='';break;case'VINE':$this->out.='';break;case'WSHH':$this->out.='';break;case'YOUTUBE':$this->out.='';break;case'br':$this->out.='
    ';break;case'e':case'i':case's':break;case'p':$this->out.='

    ';$this->at($node);$this->out.='

    ';break;default:$this->at($node);} + switch($node->nodeName){case'B':$this->out.='';$this->at($node);$this->out.='';break;case'BANDCAMP':$this->out.='';break;case'CENTER':$this->out.='
    ';$this->at($node);$this->out.='
    ';break;case'CODE':$this->out.='
    hasAttribute('lang'))$this->out.=' class="language-'.htmlspecialchars($node->getAttribute('lang'),2).'"';$this->out.='>';$this->at($node);$this->out.='
    ';break;case'COLOR':$this->out.='';$this->at($node);$this->out.='';break;case'DAILYMOTION':$this->out.='';break;case'EMAIL':$this->out.='';$this->at($node);$this->out.='';break;case'EMOJI':$this->out.=''.htmlspecialchars($node->textContent,2).'';break;case'FACEBOOK':$this->out.='';break;case'FONT':$this->out.='';$this->at($node);$this->out.='';break;case'I':$this->out.='';$this->at($node);$this->out.='';break;case'IMG':$this->out.=''.htmlspecialchars($node->getAttribute('alt'),2).'hasAttribute('height'))$this->out.=' height="'.htmlspecialchars($node->getAttribute('height'),2).'"';if($node->hasAttribute('width'))$this->out.=' width="'.htmlspecialchars($node->getAttribute('width'),2).'"';$this->out.='>';break;case'INDIEGOGO':$this->out.='';break;case'INSTAGRAM':$this->out.='';break;case'KICKSTARTER':$this->out.='hasAttribute('video'))$this->out.=' style="display:inline-block;width:100%;max-width:640px">';else$this->out.=' style="display:inline-block;width:100%;max-width:220px">';$this->out.='';break;case'LI':$this->out.='
  • ';$this->at($node);$this->out.='
  • ';break;case'LIST':if(!$node->hasAttribute('type')){$this->out.='
      ';$this->at($node);$this->out.='
    ';}elseif(str_starts_with($node->getAttribute('type'),'decimal')||str_starts_with($node->getAttribute('type'),'lower')||str_starts_with($node->getAttribute('type'),'upper')){$this->out.='
      hasAttribute('start'))$this->out.=' start="'.htmlspecialchars($node->getAttribute('start'),2).'"';$this->out.='>';$this->at($node);$this->out.='
    ';}else{$this->out.='
      ';$this->at($node);$this->out.='
    ';}break;case'LIVELEAK':$this->out.='';break;case'OL':$this->out.='
      ';$this->at($node);$this->out.='
    ';break;case'QUOTE':$this->out.='hasAttribute('author'))$this->out.=' class="uncited"';$this->out.='>
    ';if($node->hasAttribute('author'))$this->out.=''.htmlspecialchars($node->getAttribute('author'),0).' '.htmlspecialchars($this->params['L_WROTE'],0).'';$this->at($node);$this->out.='
    ';break;case'S':$this->out.='';$this->at($node);$this->out.='';break;case'SIZE':$this->out.='';$this->at($node);$this->out.='';break;case'SOUNDCLOUD':$this->out.='';break;case'SPOILER':$this->out.='
    '.htmlspecialchars($this->params['L_SPOILER'],0).' '.htmlspecialchars($node->getAttribute('title'),0).'
    ';$this->at($node);$this->out.='
    ';break;case'TABLE':$this->out.='';$this->at($node);$this->out.='
    ';break;case'TD':$this->out.='hasAttribute('colspan'))$this->out.=' colspan="'.htmlspecialchars($node->getAttribute('colspan'),2).'"';if($node->hasAttribute('rowspan'))$this->out.=' rowspan="'.htmlspecialchars($node->getAttribute('rowspan'),2).'"';if($node->hasAttribute('align'))$this->out.=' style="text-align:'.htmlspecialchars($node->getAttribute('align'),2).'"';$this->out.='>';$this->at($node);$this->out.='';break;case'TH':$this->out.='hasAttribute('colspan'))$this->out.=' colspan="'.htmlspecialchars($node->getAttribute('colspan'),2).'"';if($node->hasAttribute('rowspan'))$this->out.=' rowspan="'.htmlspecialchars($node->getAttribute('rowspan'),2).'"';if($node->hasAttribute('align'))$this->out.=' style="text-align:'.htmlspecialchars($node->getAttribute('align'),2).'"';$this->out.='>';$this->at($node);$this->out.='';break;case'TR':$this->out.='';$this->at($node);$this->out.='';break;case'TWITCH':$this->out.='';break;case'TWITTER':$this->out.='';break;case'U':$this->out.='';$this->at($node);$this->out.='';break;case'UL':$this->out.='
      ';$this->at($node);$this->out.='
    ';break;case'URL':$this->out.='hasAttribute('title'))$this->out.=' title="'.htmlspecialchars($node->getAttribute('title'),2).'"';$this->out.='>';$this->at($node);$this->out.='';break;case'VIMEO':$this->out.='';break;case'VINE':$this->out.='';break;case'WSHH':$this->out.='';break;case'YOUTUBE':$this->out.='';break;case'br':$this->out.='
    ';break;case'e':case'i':case's':break;case'p':$this->out.='

    ';$this->at($node);$this->out.='

    ';break;default:$this->at($node);} } /** {@inheritdoc} */ public $enableQuickRenderer=true; /** {@inheritdoc} */ - protected $static=['/B'=>'','/CENTER'=>'','/CODE'=>'','/COLOR'=>'','/EMAIL'=>'','/FONT'=>'','/I'=>'','/LI'=>'','/OL'=>'','/QUOTE'=>'','/S'=>'','/SIZE'=>'','/SPOILER'=>'','/TABLE'=>'','/TD'=>'','/TH'=>'','/TR'=>'','/U'=>'','/UL'=>'','/URL'=>'','B'=>'','CENTER'=>'
    ','I'=>'','LI'=>'
  • ','OL'=>'
      ','S'=>'','TABLE'=>'','TR'=>'','U'=>'','UL'=>'
        ']; + protected $static=['/B'=>'','/CENTER'=>'','/CODE'=>'','/COLOR'=>'','/EMAIL'=>'','/FONT'=>'','/I'=>'','/LI'=>'','/OL'=>'','/QUOTE'=>'','/S'=>'','/SIZE'=>'','/SPOILER'=>'','/TABLE'=>'
      ','/TD'=>'','/TH'=>'','/TR'=>'','/U'=>'','/UL'=>'','/URL'=>'','B'=>'','CENTER'=>'
      ','I'=>'','LI'=>'
    1. ','OL'=>'
        ','S'=>'','TABLE'=>'','TR'=>'','U'=>'','UL'=>'