Skip to content
Permalink
Browse files

Fix extra spaces in example direct link URL on /about

  • Loading branch information
SeinopSys committed Mar 18, 2020
1 parent eda43ce commit a89cd0516670d347f49c1947dd701be03e1ea8c4
Showing with 3 additions and 17 deletions.
  1. +1 −0 app/Twig.php
  2. +2 −17 templates/about/index.html.twig
@@ -34,6 +34,7 @@ public static function init(LoaderInterface $loader, array $options = []):void {
self::$env->addFunction(new TwigFunction('hex2rgb', fn(string $color) => RGBAColor::parse($color)->toRGB()));

self::$env->addFilter(new TwigFilter('apos_encode', '\App\CoreUtils::aposEncode'));
self::$env->addFilter(new TwigFilter('wbr_slash', fn(string $text) => preg_replace('~/([^/])~', '/<wbr>$1', $text)));

self::$env->addTest(new TwigTest('numeric', 'is_numeric'));
}
@@ -55,23 +55,8 @@
<li><a href="https://derpibooru.org/">Derpibooru</a></li>
<li><a href="https://app.prntscr.com/">LightShot</a></li>
</ul>
<p>* Using direct links from these providers is not supported due to the ambiguous URL schema shared by both Sta.sh and DeviantArt (both links end with an ID in the same format). Example: the link <q>http://fav.me/
<wbr>
dzc2af9</q> could have a download link that points to <q>http://orig11.deviantart.net/
<wbr>
27f5/
<wbr>
f/
<wbr>
2017/
<wbr>
107/
<wbr>
3/
<wbr>
b/
<wbr>
image_by_user-dzc2af9.png</q>. If you use the second link, the site won't accept it. <a id="butwhy" href="#show-boring-details">But why?</a><span class="hidden" id="thisiswhy"><br>To understand why I, as a developer cannot provide support for this, let's look at an example with a normal link and its corresponding direct link from Sta.sh: <q>https://sta.sh/<wbr>0z5gg4as67m</q> &rarr; <q>http://orig00.deviantart.net/<wbr>9935/<wbr>f/<wbr>2016/<wbr>089/<wbr>8/<wbr>e/<wbr>another_image_by_user-dxc2f9v.jpg</q> Notice anything different? It's the lack of distinct difference between the two, there's nothing to tell which site the image came from. Hopefully this gives you an idea of why things are the way they are.</span></p>
<p>* Using direct links from these providers is not supported due to the ambiguous URL schema shared by both Sta.sh and DeviantArt (both links end with an ID in the same format). Example: the link <q>{{ 'http://fav.me/dzc2af9' | wbr_slash }}</q> could have a download link that points to <q>{{ 'http://orig11.deviantart.net/27f5/f/2017/107/3/b/image_by_user-dzc2af9.png' | wbr_slash }}</q>. If you use the second link, the site won't accept it. <a id="butwhy" href="#show-boring-details">But why?</a><span class="hidden" id="thisiswhy"><br>To understand why I, as a developer cannot provide support for this, let's look at an example with a normal link and its corresponding direct link from Sta.sh: <q>{{ 'https://sta.sh/0z5gg4as67m' | wbr_slash }}</q> &rarr; <q>{{ 'http://orig00.deviantart.net/9935/f/2016/089/8/e/another_image_by_user-dxc2f9v.jpg' | wbr_slash }}</q> Notice anything different? It's the lack of distinct difference between the two, there's nothing to tell which site the image came from. Hopefully this gives you an idea of why things are the way they are.</span>
</p>
</div>
</section>
<section>

0 comments on commit a89cd05

Please sign in to comment.
You can’t perform that action at this time.