gotosocial/internal/db/bundb
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
..
migrations [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
account.go [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
account_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
admin.go [bug] Fix OIDC users requiring second approval (#371) 2022-01-31 16:03:47 +01:00
admin_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
basic.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
basic_test.go [bugfix] Allow self-boosting for any visibility but direct (#510) 2022-05-02 15:23:37 +02:00
bundb.go [feature] Add log-db-queries config option (#465) 2022-04-18 16:47:11 +02:00
bundb_test.go [feature] Clean up/uncache remote media (#407) 2022-03-07 11:08:26 +01:00
bundbnew_test.go [bug] Fix sqlite empty address issue (#370) 2022-01-30 17:06:28 +01:00
conn.go [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
domain.go [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
domain_test.go [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
errors.go go fmt 2022-02-08 12:19:54 +01:00
instance.go [bugfix] Fix infinite domain block database loop (#467) 2022-04-18 17:44:36 +02:00
media.go [feature] Clean up/uncache remote media (#407) 2022-03-07 11:08:26 +01:00
media_test.go [feature] Clean up/uncache remote media (#407) 2022-03-07 11:08:26 +01:00
mention.go [chore] Update Go version to 1.18 (#444) 2022-04-02 15:40:09 +02:00
mention_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
notification.go [chore] Update Go version to 1.18 (#444) 2022-04-02 15:40:09 +02:00
notification_test.go [performance] Database optimizations (#419) 2022-03-07 11:33:18 +01:00
relationship.go [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
relationship_test.go [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
session.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
session_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
status.go [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
status_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
timeline.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
timeline_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
trace.go [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
util.go [feature] Clean up/uncache remote media (#407) 2022-03-07 11:08:26 +01:00