Commit Graph

64 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
076cc9e868 lint: remove unused url 2025-08-13 17:36:55 -04:00
Julian Lam
06c3824740 fix: regression caused by cc6fd49c4d 2025-08-13 14:41:44 -04:00
Julian Lam
cc6fd49c4d fix: protocol-relative URLs being accidentally munged, #13592 2025-08-13 10:01:05 -04:00
Julian Lam
f64e6f0f1a refactor: Posts.relativeToAbsolute so that the regexes passed to it no longer need a pre-defined length, it is now calculated from the match result, added new regex for markdown image/anchors 2025-01-29 11:55:38 -05:00
Julian Lam
b386e4a66e feat: introduce new 'markdown' post parsing type, closes #13077 2025-01-23 14:52:14 -05:00
Barış Soner Uşaklı
df6062d8be Merge branch 'develop' into activitypub 2024-08-21 12:57:10 -04:00
Barış Soner Uşaklı
5eaba4935c Merge branch 'master' into develop 2024-08-12 10:30:12 -04:00
Barış Soner Uşaklı
c3f02b74cc feat: add allow and frameborder to allow attrs 2024-08-12 10:30:01 -04:00
Julian Lam
c01f154937 breaking: core html stripping on plaintext, remove 'filter:teasers.configureStripTags' hook, remove html stripping from teaser generation
These two steps were removed because a `type` property is passed to `filter:post.parse` now, and thus plugins themselves can handle independently.

Core also now strips all html when `type` is plaintext, so plugins don't have to (or if they still pass html back).
2024-07-12 12:30:37 -04:00
Barış Soner Uşaklı
00c70ce7b0 Merge branch 'develop' into activitypub 2024-06-10 17:30:10 -04:00
Barış Soner Uşaklı
d9e135ef2f Merge branch 'master' into develop 2024-06-10 17:26:45 -04:00
Barış Soner Uşaklı
236ac32303 refactor: posts cache to get rid of require in functions 2024-06-10 17:10:43 -04:00
Barış Soner Uşaklı
f83a3672ca fix: set 2024-06-07 12:58:04 -04:00
Barış Soner Uşaklı
9868a728bf refactor: single cache.del call 2024-06-04 21:14:11 -04:00
Julian Lam
09e71e94a2 Merge branch 'develop' into activitypub 2024-05-23 15:18:56 -04:00
Julian Lam
db30834ebc fix: sanitize-html configuration passed in src/posts/parse.js
Cursory review of sanitize-html documentation suggests that the currently-used `globalAttributes` property no longer exists, but was replaced with `nonBooleanAttributes`, likely because the attribute allow-list explicitly applies only to "non-boolean" attributes (e.g. not `checked` or `selected`).

Either way it does not likely affect us but is mainly here for future-proofing purposes.
2024-05-23 15:18:29 -04:00
Julian Lam
8cf9617630 feat: passing in types to parsePost for more specific handling by plugins 2024-05-17 15:22:13 -04:00
Barış Soner Uşaklı
1027c6e6dd Merge branch 'develop' into activitypub 2024-03-20 12:20:57 -04:00
Tomas Nesrovnal
5924a6eb43 feat: add playsinline video attribute (#12419) 2024-03-18 12:25:07 -04:00
Julian Lam
3e02efcdb9 lint: unused requires, linting fixes 2024-02-20 14:26:21 -05:00
Julian Lam
e5b6ee97bd feat: attachments support 2024-02-16 12:07:29 -05:00
Julian Lam
8b0ccc8090 fix: sanitize post remote post content regardless 2024-02-14 22:53:27 -05:00
Julian Lam
3ce84b39bc feat: ability to load remote post data in a topic 2024-01-10 20:52:28 -05:00
Julian Lam
f09f4105ba fix: nodebb/nodebb-plugin-link-preview#18, remove sup from allowedTags, add source + source attributes 2023-09-11 13:56:50 -04:00
Peter Jaszkowiak
cc9d6fd08b chore: eslint max-len 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
dab3b23575 chore: eslint no-var, vars-on-top 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 2021-02-08 18:06:44 -05:00
Julian Lam
6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 2020-11-20 16:32:39 -05:00
Barış Soner Uşaklı
f1f9b225b0 feat: #8824, cache refactor (#8851)
* feat: #8824, cache refactor

ability to disable caches
ability to download contents of cache
refactor cache modules to remove duplicated code

* fix: remove duplicate hit/miss tracking

check cacheEnabled in getUncachedKeys
2020-11-06 23:13:12 -05:00
Julian Lam
4a63c20a72 chore: some optimizations for codeclimate 2020-10-08 15:58:42 -04:00
Renovate Bot
1e5621c049 fix(deps): update dependency sanitize-html to v2 2020-09-29 13:34:36 -04:00
Barış Soner Uşaklı
1e5981c0d6 feat: replace relative urls to absolute before sending email notifs
https://github.com/NodeBB/NodeBB/pull/8366/files
2020-09-03 12:02:07 -04:00
Peter Jaszkowiak
8c314fe461 Support allowing classes
Otherwise `<input class="form-control">` can't work
2019-12-08 12:35:08 -05:00
Julian Lam
0c4cd840a0 fix: added comment back 2019-09-04 11:44:04 -04:00
Julian Lam
fe452762b7 fix: inability for plugins to actually alter parser sanitization config
/cc @pitaj
2019-09-04 11:43:05 -04:00
Julian Lam
2580306db9 feat: html sanitization on all filter:parse.* hooks, closes #7872 2019-08-30 14:40:18 -04:00
Barış Soner Uşaklı
c0c6c652be feat: #7743, finish post module 2019-07-17 19:05:55 -04:00
Barış Soner Uşaklı
ac39112271 remove more parseInts 2018-10-21 19:33:46 -04:00
Barış Soner Uşaklı
9c022afae1 Parse int (#6853)
* Store config fields as JSON in the db

Fewer parseInts

* Remove unnecessary parseInts

* remove some dupe code add tests

* remove console.log

* remove more parseInts

* WIP: read meta.configs defaults from defaults.json

remove more parseInts

* more work

* add log for failing test

* update admin pwd

* fix tests, dont require posts/cache before configs are initialized

* handle saves

* Test boolean conditions

* remove more parseInts

* Fix boolean values

* remove lots more parseInts

* removed json parsing

* renamed var to number

* categories dont have timestamp
2018-10-21 16:47:51 -04:00
Barış Soner Uşaklı
6c15aee888 add cache hits/misses to posts cache 2018-10-15 15:03:06 -04:00
Peter Jaszkowiak
46fafb20b9 Remove string.js dependency 2017-10-13 21:02:41 -06:00
Barış Soner Uşaklı
3049f5cf1f #5522 test 2017-05-28 01:26:56 -04:00
Barış Soner Uşaklı
6635b50c35 closes #5522 2017-05-28 01:10:19 -04:00
Peter Jaszkowiak
1fb48ef7a7 Fix #5592 (#5593)
* Fix #5592
Escape translation tokens in topic titles, descriptions, profile about, and post contents

* Fix tests
2017-04-13 21:37:54 +03:00
Peter Jaszkowiak
1ed571189c Make utils and translator easier to require
Move utils.walk to file.walk, backwards compatible
2017-04-08 20:27:52 -06:00
barisusakli
8d493bf3b0 post parse test 2017-03-09 19:52:48 +03:00
Peter Jaszkowiak
04bb6513b0 ESlint no-cond-assign, no-void, valid-jsdoc 2017-02-18 13:51:26 -07:00
Peter Jaszkowiak
896c8c7343 ESlint object-curly-spacing 2017-02-18 12:30:49 -07:00
Peter Jaszkowiak
3b0dd2d1ef ESlint padded-blocks 2017-02-18 02:32:24 -07:00
Peter Jaszkowiak
604358ecc4 ESlint keyword-spacing, no-multi-spaces 2017-02-18 01:52:56 -07:00