gotosocial/internal
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
..
ap [bugfix] Fix CWs not showing sometimes (#488) 2022-04-26 10:47:21 +02:00
api [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
cache [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
config [feature] Add log-db-queries config option (#465) 2022-04-18 16:47:11 +02:00
db [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
email [feature] allow absolute path to templates (#507) 2022-04-29 11:00:25 +02:00
federation [chore] Fix inbox iris test to use 'contains' instead of index (#529) 2022-05-02 16:12:56 +02:00
gotosocial test the media manager a bit, add shutdown logic 2022-01-10 18:36:09 +01:00
gtserror emoji code passing muster 2022-01-15 17:36:15 +01:00
gtsmodel [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
id change muchos things 2021-09-01 11:11:26 +02:00
log [performance] improved logrus output switching performance (#544) 2022-05-07 17:46:59 +02:00
media [feature] Update media manager to use internal/worker package (#543) 2022-05-07 17:36:01 +02:00
messages Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
oauth [feature] add authorization to the already-existing authentication (#365) 2022-02-07 12:04:31 +01:00
oidc Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
processing [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
regexes [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
router [bugfix] Fix panic when relative tmpl path given to router (#528) 2022-05-02 16:06:03 +02:00
stream Fix streamed messages ending up in wrong timeline(s) (#325) 2021-11-22 19:03:21 +01:00
text [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
timeline [bugfix] Allow self-boosting for any visibility but direct (#510) 2022-05-02 15:23:37 +02:00
trans Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
transport [bugfix] Use our own (Batch)Deliver implementation for federated messages (#466) 2022-04-18 17:17:05 +02:00
typeutils [bugfix] Fix existing bio text showing as HTML (#531) 2022-05-07 17:55:27 +02:00
uris Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
util [chore] Update all but bun libraries (#526) 2022-05-02 15:05:18 +02:00
validate [chore] Update Go version to 1.18 (#444) 2022-04-02 15:40:09 +02:00
visibility [bugfix] Allow self-boosting for any visibility but direct (#510) 2022-05-02 15:23:37 +02:00
web [performance] Speed up some of the slower db queries (#523) 2022-05-02 11:53:46 +01:00
worker [feature] Update media manager to use internal/worker package (#543) 2022-05-07 17:36:01 +02:00