Commit graph

61 commits

Author SHA1 Message Date
ilja
6666a273a4 MFM only use sanitised data-* attribute values
We take the value from a data-* attribute and then add this to the style attribute.
This will probably be OK in most cases, but just to be sure, we check for "weird" characters first.
For now we only allow letters, numbers, dot, hash, and plus and minus sign, because those are the ones I currently know of who are used in MFM.
The data-* attribute remains because it was already considered proper HTML as-is.
2024-08-11 18:11:03 +02:00
ilja
56a59e1b55 fill in data-mfm- variables
Things like `speed=0.1s` now work

I also noticed a class was set on StatusBody, but we don't use it, we use StatusContent.
Therefor I removed it now.

We do still pass the setting through StatusBody to RichContent bc it's used there to decide to not show greentext for arrows when MFM was used.
Note that while this setting still works
* You have to refresh the page to see it working (was already like this, so I didn't touch it here)
* It explicitly checks for content type. If womeone provides MFM-like HTML, then it will still show as greentext if that option is enabled
  I think it's a bit inconsistent, but otoh, the inconsistency to me seems more that we ignore the greentext option for one input type specifically

I do still notice generall bugs with MFM.
* Position doesn't seem to work, neither does scale.
* There also seems to be a regression where custom emojis don't become larger any more with e.g. `$[x2 :hehe: ]`

I don't assume the regression is made in this commit, so I add this already. The rest needs to be fixed before merging.
2024-08-05 17:23:15 +02:00
FloatingGhost
14cedc5ed1 don't crash if class isn't a list 2023-04-01 07:55:47 +01:00
floatingghost
c01c62f149 Redirect users to "awaiting approval" message on register (#231)
Ref #81 - this implements a "your request has been sent" message

 ![image](/attachments/61dc3f5e-2706-46f9-a1ca-4efe3f526ff3)

Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/231
2022-11-22 14:44:44 +00:00
FloatingGhost
169282ea42 rely on backend mfm parsing 2022-11-15 15:54:16 +00:00
floatingghost
db46879a8f Big 'ol set of patches and dep maintenance (#212)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/212
2022-11-15 15:47:32 +00:00
FloatingGhost
ffac376b5a Ensure MFM scaling is ignored when rendering is disabled
Fixes #173
2022-11-02 22:33:54 +00:00
floatingghost
2d85ee6a08 use-server-side-mfm (#133)
Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/133
2022-08-18 03:14:38 +00:00
floatingghost
e61228b031 use akkoma-specific source for MFM unless asked not to (#132)
Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/132
2022-08-17 09:34:50 +00:00
FloatingGhost
cbf883ab1e fix "who reacted" emoji display
fixes #80
2022-08-11 18:14:05 +01:00
Sol Fisher Romanoff
6441ff45a9
Decode html-encoded characters inside pre tags 2022-08-02 12:37:18 +03:00
Sol Fisher Romanoff
b69801d33f
Fix code blocks not working in MFM 2022-08-01 16:14:14 +03:00
FloatingGhost
d29bccb7d6 bugfix: spin css, props setting 2022-07-15 10:55:47 +01:00
Sol Fisher Romanoff
a8f9734400
Don't greentext MFM 2022-07-13 20:59:41 +03:00
Sol Fisher Romanoff
8c9821e444
Parse MFM options with values 2022-07-12 20:36:48 +03:00
Sol Fisher Romanoff
5e18f1ceeb
Move MFM content rendering to RichContent 2022-07-12 20:36:03 +03:00
floatingghost
a0305e90f0 fix tests and add CI (#5)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: http://akkoma.dev/AkkomaGang/pleroma-fe/pulls/5
2022-06-15 17:22:02 +00:00
FloatingGhost
f6cf509a04 Merge remote-tracking branch 'upstream/develop' into develop 2022-06-08 18:09:16 +01:00
Henry Jameson
d175e86901 fix hashtags by explicitly putting attributes 2022-04-12 18:10:19 +03:00
Henry Jameson
c2cf13fc00 fix richcontent and its tests 2022-03-22 18:22:23 +02:00
Henry Jameson
4993dc37e2 fix rich content not rendering stillimage nor links correctly 2022-03-17 08:53:45 +02:00
Henry Jameson
8311d4deba shit renders yo 2022-03-16 22:13:21 +02:00
Henry Jameson
571e73a346 better approach to unescaping 2022-02-03 23:13:28 +02:00
Henry Jameson
39ecb33883 fix amps in links 2022-02-03 22:58:12 +02:00
Henry Jameson
6d3229b1a1 fix poast mentions tripping 2022-02-03 22:23:28 +02:00
FloatingGhost
41991bcac2 fix masto link handling 2022-01-29 13:09:55 +00:00
FloatingGhost
1bc05e87e4 apply patches 2022-01-28 19:07:28 +00:00
FloatingGhost
f065fe98b2 Revert "fix hrefs"
This reverts commit aecc59cdc8.
2022-01-28 19:02:42 +00:00
FloatingGhost
aecc59cdc8 fix hrefs 2022-01-28 18:45:21 +00:00
Henry Jameson
4d73eaa6ce fix spacing before hashtags 2021-08-23 21:36:18 +03:00
Henry Jameson
39494439d3 very minimalist hashtaglink implementation, also you can middle-click
mentions now.
2021-08-23 20:57:21 +03:00
Henry Jameson
e98a2af39e hopefully final fix for spacings 2021-08-18 20:54:04 +03:00
Henry Jameson
8cc1ad67df fix links sticking to mentionsline 2021-08-15 18:11:38 +03:00
Henry Jameson
530ac4442b removed useless code, review change, fixed bug with tall statuses 2021-08-15 02:41:53 +03:00
Henry Jameson
add5921b8b fix tests, add performance test (skipped, doesn't assert anything),
tweak max mentions count
2021-08-12 19:37:04 +03:00
Henry Jameson
2cfff1b8b9 remove new options for style and separate line, now groups all chained
mentions on a mentionsline regardless of placement. fixes spacing
2021-08-12 02:56:40 +03:00
Henry Jameson
a258182522 fix non-notifying mentions and original mention display 2021-06-22 20:16:26 +03:00
Henry Jameson
c6831a3810 fix not escaping some stuff 2021-06-18 21:42:46 +03:00
Henry Jameson
ad3a2fd4e5 fixed "invisible" spans inside links 2021-06-16 01:20:20 +03:00
Henry Jameson
4aac0125e5 fixed bug with hashtags 2021-06-15 14:43:44 +03:00
Henry Jameson
c21b1cf898 do the impossible, fix the unfixable 2021-06-14 10:30:08 +03:00
Henry Jameson
636dbdaba8 more fixes 2021-06-13 22:22:59 +03:00
Henry Jameson
bebafa1a2c refactored line converter, untied its logic from greentexting, better
handling of broken cases
2021-06-13 15:24:29 +03:00
Henry Jameson
9c70f3e4df fixed a bug + made a testcase out of it 2021-06-12 21:49:56 +03:00
Henry Jameson
418f029789 review + fixes 2021-06-12 20:43:29 +03:00
Henry Jameson
cd44556750 restructure and tests
squash! restructure and tests
2021-06-12 19:54:30 +03:00
Henry Jameson
ca6c7d5b10 fix tags gluing 2021-06-12 17:20:21 +03:00
Henry Jameson
c1bd36dc6f change how "first" line is determined. Allow one mention in the
beginning for hellthread style
2021-06-12 16:15:22 +03:00
Henry Jameson
9421501c1e lint & cleanup 2021-06-11 11:52:50 +03:00
Henry Jameson
255f47fe56 fix infinite loop 2021-06-11 11:05:28 +03:00