Fixed isAd crash

This commit is contained in:
Pablo Ferreiro 2023-06-12 15:08:02 +02:00
parent 19a2066fc2
commit 8c769d89d4
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
4 changed files with 16 additions and 23 deletions

View file

@ -98,12 +98,6 @@ class Wrappers {
// Add URLs to video descriptions // Add URLs to video descriptions
// TODO: Make it work with unicode characters such as emojis // TODO: Make it work with unicode characters such as emojis
$latte->addFunction('render_desc', function (string $desc, array $textExtras = []): string { $latte->addFunction('render_desc', function (string $desc, array $textExtras = []): string {
$bytesCount = strlen($desc);
$charsCount = mb_strlen($desc);
// Skip urlify for now if there is a special char like an emoji to avoid issues
if ($bytesCount !== $charsCount) {
return $desc;
}
$sanitizedDesc = htmlspecialchars($desc); $sanitizedDesc = htmlspecialchars($desc);
$out = $sanitizedDesc; $out = $sanitizedDesc;
foreach ($textExtras as $extra) { foreach ($textExtras as $extra) {

View file

@ -1,7 +1,7 @@
{ {
"name": "pablouser1/proxitok", "name": "pablouser1/proxitok",
"description": "An alternative frontend for TikTok", "description": "An alternative frontend for TikTok",
"version": "2.4.9.1", "version": "2.4.9.2",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"type": "project", "type": "project",
"authors": [ "authors": [

30
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "790ea9098323ef66c520cfe44b92b7d3", "content-hash": "92c34c828c921f4e49b6dc6ab9bf3d8b",
"packages": [ "packages": [
{ {
"name": "bramus/router", "name": "bramus/router",
@ -103,12 +103,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/josegonzalez/php-dotenv.git", "url": "https://github.com/josegonzalez/php-dotenv.git",
"reference": "f6d2fb63610f98b7ae859031566228dbade1a79c" "reference": "e97dbd3db53508dcd536e73ec787a7f11458d41d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/josegonzalez/php-dotenv/zipball/f6d2fb63610f98b7ae859031566228dbade1a79c", "url": "https://api.github.com/repos/josegonzalez/php-dotenv/zipball/e97dbd3db53508dcd536e73ec787a7f11458d41d",
"reference": "f6d2fb63610f98b7ae859031566228dbade1a79c", "reference": "e97dbd3db53508dcd536e73ec787a7f11458d41d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -116,9 +116,9 @@
"php": ">=5.5.0" "php": ">=5.5.0"
}, },
"require-dev": { "require-dev": {
"php-mock/php-mock-phpunit": "^1.1", "php-coveralls/php-coveralls": "~2.0",
"satooshi/php-coveralls": "1.*", "php-mock/php-mock-phpunit": "~1.1||~2.0",
"squizlabs/php_codesniffer": "2.*" "squizlabs/php_codesniffer": "~2.9||~3.7"
}, },
"default-branch": true, "default-branch": true,
"type": "library", "type": "library",
@ -151,9 +151,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/josegonzalez/php-dotenv/issues", "issues": "https://github.com/josegonzalez/php-dotenv/issues",
"source": "https://github.com/josegonzalez/php-dotenv/tree/master" "source": "https://github.com/josegonzalez/php-dotenv/tree/4.0.0"
}, },
"time": "2019-07-07T21:21:39+00:00" "time": "2023-05-29T22:49:26+00:00"
}, },
{ {
"name": "latte/latte", "name": "latte/latte",
@ -614,16 +614,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v5.4.22", "version": "v5.4.24",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "4b850da0cc3a2a9181c1ed407adbca4733dc839b" "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/4b850da0cc3a2a9181c1ed407adbca4733dc839b", "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64",
"reference": "4b850da0cc3a2a9181c1ed407adbca4733dc839b", "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -656,7 +656,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v5.4.22" "source": "https://github.com/symfony/process/tree/v5.4.24"
}, },
"funding": [ "funding": [
{ {
@ -672,7 +672,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-06T21:29:33+00:00" "time": "2023-05-17T11:26:05+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View file

@ -34,7 +34,6 @@
<div class="has-text-centered"> <div class="has-text-centered">
{embed '../details.latte', title: "Details"} {embed '../details.latte', title: "Details"}
{block content} {block content}
<p>Is Ad: {bool_to_str($item->isAd)}
<p>Can duet: {bool_to_str($item->duetEnabled)}</p> <p>Can duet: {bool_to_str($item->duetEnabled)}</p>
<p>Can stitch (add this video to other ones): {bool_to_str($item->stitchEnabled)}</p> <p>Can stitch (add this video to other ones): {bool_to_str($item->stitchEnabled)}</p>
<p>Can be shared: {bool_to_str($item->shareEnabled)} <p>Can be shared: {bool_to_str($item->shareEnabled)}