gotosocial/internal/processing
kim 26b74aefaf
[bugfix] Fix existing bio text showing as HTML (#531)
* fix existing bio text showing as HTML

- updated replaced mentions to include instance
- strips HTML from account source note in Verify handler
- update text formatter to use buffers for string writes

Signed-off-by: kim <grufwub@gmail.com>

* go away linter

Signed-off-by: kim <grufwub@gmail.com>

* change buf reset location, change html mention tags

Signed-off-by: kim <grufwub@gmail.com>

* reduce FindLinks code complexity

Signed-off-by: kim <grufwub@gmail.com>

* fix HTML to text conversion

Signed-off-by: kim <grufwub@gmail.com>

* Update internal/regexes/regexes.go

Co-authored-by: Mina Galić <mina.galic@puppet.com>

* use improved html2text lib with more options

Signed-off-by: kim <grufwub@gmail.com>

* fix to produce actual plaintext from html

Signed-off-by: kim <grufwub@gmail.com>

* fix span tags instead written as space

Signed-off-by: kim <grufwub@gmail.com>

* performance improvements to regex replacements, fix link replace logic for un-html-ing in the future

Signed-off-by: kim <grufwub@gmail.com>

* fix tag/mention replacements to use input string, fix link replace to not include scheme

Signed-off-by: kim <grufwub@gmail.com>

* use matched input string for link replace href text

Signed-off-by: kim <grufwub@gmail.com>

* remove unused code (to appease linter :sobs:)

Signed-off-by: kim <grufwub@gmail.com>

* improve hashtagFinger regex to be more compliant

Signed-off-by: kim <grufwub@gmail.com>

* update breakReplacer to include both unix and windows line endings

Signed-off-by: kim <grufwub@gmail.com>

* add NoteRaw field to Account to store plaintext account bio, add migration for this, set for sensitive accounts

Signed-off-by: kim <grufwub@gmail.com>

* drop unnecessary code

Signed-off-by: kim <grufwub@gmail.com>

* update text package tests to fix logic changes

Signed-off-by: kim <grufwub@gmail.com>

* add raw note content testing to account update and account verify

Signed-off-by: kim <grufwub@gmail.com>

* remove unused modules

Signed-off-by: kim <grufwub@gmail.com>

* fix emoji regex

Signed-off-by: kim <grufwub@gmail.com>

* fix replacement of hashtags

Signed-off-by: kim <grufwub@gmail.com>

* update code comment

Signed-off-by: kim <grufwub@gmail.com>

Co-authored-by: Mina Galić <mina.galic@puppet.com>
2022-05-07 17:55:27 +02:00
..
account [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
admin [chore] Move initial MediaRemotePrune to cmd.server function (#536) 2022-05-03 10:56:18 +01:00
federation [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
media replace async client API / federator msg processing with worker pools (#497) 2022-04-28 13:23:11 +01:00
status [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
streaming [chore] Update Go version to 1.18 (#444) 2022-04-02 15:40:09 +02:00
user [bug] Send plaintext emails to fix "message refused: Message is not RFC 2822 compliant" (#366) 2022-01-31 11:46:20 +01:00
account.go [feature] Web profile pages for accounts (#449) 2022-04-15 14:33:01 +02:00
account_test.go [feature] Federate local account deletion (#431) 2022-03-15 16:12:35 +01:00
admin.go [chore] Move initial MediaRemotePrune to cmd.server function (#536) 2022-05-03 10:56:18 +01:00
app.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
blocks.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
federation.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
followrequest.go replace async client API / federator msg processing with worker pools (#497) 2022-04-28 13:23:11 +01:00
followrequest_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
fromclientapi.go [feature] Federate local account deletion (#431) 2022-03-15 16:12:35 +01:00
fromclientapi_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
fromcommon.go [chore] Update Go version to 1.18 (#444) 2022-04-02 15:40:09 +02:00
fromfederator.go Merge branch 'main' into media_refactor 2022-02-08 12:17:18 +01:00
fromfederator_test.go [feature] Web profile pages for accounts (#449) 2022-04-15 14:33:01 +02:00
instance.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
media.go [feature] Clean up/uncache remote media (#407) 2022-03-07 11:08:26 +01:00
notification.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
notification_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
processor.go [chore] Move initial MediaRemotePrune to cmd.server function (#536) 2022-05-03 10:56:18 +01:00
processor_test.go replace async client API / federator msg processing with worker pools (#497) 2022-04-28 13:23:11 +01:00
search.go [feature] Dereference remote mentions when the account is not already known (#442) 2022-03-29 11:54:56 +02:00
status.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
statustimeline.go [feature] Rework timeline code to make it useful for more than just statuses (#373) 2022-02-05 12:47:38 +01:00
streaming.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
user.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
util.go [feature] Dereference remote mentions when the account is not already known (#442) 2022-03-29 11:54:56 +02:00