Commit graph

40928 commits

Author SHA1 Message Date
Philipp
3bd6335fa6
Add test 2025-05-29 19:11:24 +02:00
Random Penguin
403b0672e6
Strip HTML tags from content sent as Markdown
The "toMarkdown" function prepares content to be sent, primarily, to Diaspora.

The HTML to Markdown converter by default "preserves HTML tags without Markdown equivalents like <span> and <div>." At least according to the README in /friendica/vendor/league/html-to-markdown/ - which also says "To strip HTML tags that don’t have a Markdown equivalent while preserving the content inside them, set strip_tags..."

Diaspora, however, does not appear to know what to DO with the HTML sent to it. It actually appears to encode the HTML and displays the code in the post body rather than rendering it as HTML. In which case it would make more sense to strip out all tags that have no Markdown equivalents.
Example
The post as sent from Friendica mixed BBcode and Markdown:
[class=postbox-ocean]Norddeutscher Bürger ![Noddeutscher Bürger - Bismark Brötchen (Roger Cziwerny - pixapay)](/rscamo/……)[/class]
The BBcode gets converted into an HTML <span> tag. 

It also looks like Diaspora encoded the Markdown for the image rather than parsing it, or at the very least didn't parse it as Markdown. Yet another reason to strip out HTML that has no Markdown equivalents. It looks like it may be encoding the tags and the content inside the tags.

And, yes, I'm aware the [class] BBcode was marked as "deprecated" in the Friendica code, but it's the only way my Bookface scheme for the "Frio" theme could implement both profile "Cover Photos" and "Postboxes." Which won't display to other platforms anyway, so I don't want to see this custom BBcode removed, I just think it needs to be stripped out before content is delivered to other platforms.

(There is a related issue with Hubzilla where the raw BBcode is coming through unparsed because the [class] code apparently does not exist in Hubzilla's BBcodes. But I've no clue where or how to fix that in Friendica or if it can be as it may need to be handled on Hubzilla's end).
2025-04-26 16:44:14 -05:00
Random Penguin
09c6061810
Strip HTML tags from content sent as Markdown
The "toMarkdown" function prepares content to be sent, primarily, to Diaspora.

The HTML to Markdown converter by default "preserves HTML tags without Markdown equivalents like `<span>` and `<div>.`" At least according to the README in _/friendica/vendor/league/html-to-markdown/_ - which also says "To strip HTML tags that don’t have a Markdown equivalent while preserving the content inside them, set strip_tags..."

Diaspora, however, does not appear to know what to DO with the HTML sent to it. It actually appears to _encode_ the HTML and displays the *code* in the post body rather than rendering it as HTML. In which case it would make more sense to strip out all tags that have no Markdown equivalents.
2025-04-20 12:05:26 -05:00
Hypolite Petovan
cd3d412a59
Merge pull request #14885 from annando/bluesky-profile-links
Bluesky: use did based profile links
2025-04-17 00:00:01 -04:00
Hypolite Petovan
7dc681d18c
Merge pull request #14883 from annando/issue-14881
Issue 14881: Fixed language detection for danish
2025-04-16 23:58:58 -04:00
Michael
37d324e63b Bluesky: use did based profile links 2025-04-16 04:13:09 +00:00
Michael
cc4ff9584f Fixed codestyle 2025-04-15 02:09:19 +00:00
Michael
e7bd6e7663 Issue 14881: Fixed language detection for danish 2025-04-15 02:03:35 +00:00
Hypolite Petovan
83f561ea49
Merge pull request #14880 from Art4/log-exceptions-as-critical
Log uncaught exceptions as critical
2025-04-10 10:06:27 -04:00
Art4
7bfd42ac55 log uncaught exceptions as critical 2025-04-10 11:18:38 +00:00
Hypolite Petovan
507897eec1
Merge pull request #14873 from annando/issue-14800-2
Fix blurred images
2025-03-31 17:49:30 -04:00
Michael
6cab9c010d Fix blurred images 2025-03-31 20:38:37 +00:00
Hypolite Petovan
43f67dd2a2
Merge pull request #14870 from annando/issue-14800
Added more logging to track down issue 14800
2025-03-29 16:10:25 -04:00
Michael
5c1b5bae61 Added more logging to track down issue 14800 2025-03-29 09:07:11 +00:00
Michael Vogel
cf56aa3a64
Merge pull request #14852 from MrPetovan/bug/warnings
Add support for more datetime formats
2025-03-19 04:32:31 +01:00
Hypolite Petovan
fdadf646c4
Merge pull request #14862 from annando/fixcontacts
Add missing public contacts and account-user entries
2025-03-18 19:29:51 -04:00
Hypolite Petovan
dde6722c5b
Merge pull request #14860 from annando/backfill
Improved support for backfilled posts
2025-03-18 19:29:00 -04:00
Hypolite Petovan
47e4bad151 Fix formatting in DateTimeFormatTest 2025-03-18 19:07:25 -04:00
Hypolite Petovan
6f159e69be Add support for more datetime formats
- Unix Timestamp
- RFC 3339 extended + timezone name in square brackets
- Address https://github.com/friendica/friendica/issues/14647#issuecomment-2719430131
2025-03-18 19:01:42 -04:00
Michael
fcb8892e2f Add missing public contacts and account-user entries 2025-03-18 05:33:01 +00:00
Michael
2de7034e16 Improved support for backfilled posts 2025-03-15 05:58:58 +00:00
Michael Vogel
0aa350f1c8
Merge pull request #14859 from nupplaphil/feat/woodpecker
[CI] Woodpecker improvements
2025-03-15 06:54:05 +01:00
Philipp
5f70ae9c1e
Avoid deprecated polluting 2025-03-15 00:39:35 +01:00
Philipp
c6fbacd3e8
[CI] avoid safe.directory issues when cloning 2025-03-15 00:18:39 +01:00
Philipp
3121a256e2
Workaround for git.friendi.ca issue -> enforce external access 2025-03-15 00:04:30 +01:00
Philipp
353ad039c8
[CI] Bump PHP versions in woodpecker 2025-03-14 23:53:11 +01:00
Hypolite Petovan
aeaa488d1b
Merge pull request #14849 from Art4/patch-1
Remove BC promise for extending any non-abstract class
2025-03-12 09:13:48 -04:00
Artur Weigandt
6b7dd7bd12
remove BC for extending any non-abstract class 2025-03-12 11:06:28 +01:00
Michael Vogel
8620b59dcc
Merge pull request #14848 from MrPetovan/bug/warnings
Ward against missing array key in Protocol\Feed
2025-03-11 15:06:59 +01:00
Hypolite Petovan
c1184698ee Ward against missing array key in Protocol\Feed
- Address https://github.com/friendica/friendica/issues/14647#issuecomment-2667306693
2025-03-11 09:15:42 -04:00
Hypolite Petovan
64d85ad86a
Merge pull request #14846 from annando/warning
Add public contact if missing
2025-03-11 09:02:00 -04:00
Michael
24cbfd0953 Fix codestyle 2025-03-11 04:54:16 +00:00
Michael
9e4a69150c Add public contact if missing 2025-03-11 04:51:20 +00:00
Hypolite Petovan
9261b5262c
Merge pull request #14845 from annando/issue-14433
Issue 14433: Display reshared content in feeds
2025-03-10 10:24:49 -04:00
Michael
d990026fb8 Issue 14433: Display reshared content in feeds 2025-03-10 05:15:43 +00:00
Hypolite Petovan
b2f50301f4
Merge pull request #14795 from Art4/deprecate-strategies-via-addons
Deprecate the strategy concept for addons
2025-03-09 20:55:25 -04:00
Hypolite Petovan
ecfb82693d
Merge pull request #14837 from annando/fatal
Fixes fatal error "Return value must be of type Friendica\Object\OEmbed, string returned"
2025-03-08 15:58:37 -05:00
Michael Vogel
f504c9d60a
Merge pull request #14843 from MrPetovan/bug/14828-expireposts-performance
Replace NOT EXIST(SELECT) with LEFT JOIN WHERE IS NULL in ExpirePosts
2025-03-08 17:58:59 +01:00
Hypolite Petovan
4883035f89 Replace NOT EXIST(SELECT) with LEFT JOIN WHERE IS NULL in ExpirePosts
- Improves the query execution plan
2025-03-08 11:23:54 -05:00
Michael
3b5ad05e47 Fixes fatal error "Return value must be of type Friendica\Object\OEmbed, string returned" 2025-03-08 12:11:37 +00:00
Michael Vogel
dc3dcb4a36
Merge pull request #14841 from MrPetovan/bug/14801-safari-workaround
[frio] Fix Safari bug where notification icon jumps to next line
2025-03-06 05:02:57 +01:00
Hypolite Petovan
e9dae569cc [frio] Fix Safari bug where notification icon jumps to next line 2025-03-05 19:08:14 -05:00
Hypolite Petovan
af17e33d4e
Merge pull request #14835 from annando/api
Improved Mastodon API compatibility
2025-03-04 23:00:06 -05:00
Michael
fc8946cf02 Support for language and publification date 2025-03-02 16:47:21 +00:00
Michael
1ced848827 Fix codestyle 2025-03-01 14:40:50 +00:00
Michael
fb9a20feaa Improved Mastodon API compatibility 2025-03-01 12:38:09 +00:00
Hypolite Petovan
afcc5a9205
Merge pull request #14799 from Art4/replace-hooks-with-eventdispatcher
Replace Hooks with EventDispatcher Part 2
2025-02-26 10:42:42 -05:00
Artur Weigandt
21c2c1559b
Update src/Content/OEmbed.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-02-26 08:06:35 +01:00
Art4
82ea62ba7c Fix code style 2025-02-24 08:42:54 +00:00
Art4
f3a8bcff11 Create Events for protocol support hooks 2025-02-24 08:40:07 +00:00