131 Commits

Author SHA1 Message Date
Chloe Oletto
43b90070a9 core: Limit note subtitle/headline length. (#9732)
Signed-off by: Chloe Oletto <NeedsChloesure@riseup.net>
2026-04-23 22:27:33 +05:00
01zulfi
49252e66ce web: fix RCE via stored XSS in note html export (#9709)
* sandbox the export iframe
* escape fields when building html template

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-04-17 18:10:06 +05:00
01zulfi
21f4b906d7 web: fix html entities shown in match result (#9645)
* web: fix non-breaking space shown as encoded in match result
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: decode matches in db.lookup.notesWithHighlighting
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: decode entities at parse time

---------

Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2026-04-06 14:20:10 +05:00
01zulfi
413ca61ef5 core: $headline$ format should get 60 chars from first p or h tag (#9658)
* core: note title headline format should get content from first p or h tag
* also decrease character limit to 60

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* Apply suggestion from @thecodrr

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2026-04-06 09:20:21 +05:00
01zulfi
539950bdc5 core: perform fuzzy search again if query contains non-alphanumeric chars (#9634)
* core: simplify fuzzy separator regex
* remove lookahead and lookbehind

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: do 2 pass fuzzy search if query contains non-alphanumeric chars

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2026-04-02 12:13:06 +05:00
01zulfi
9628a940e9 core: normalize special separators in fuzzy search (#9541)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-03-24 09:50:27 +05:00
01zulfi
5c21c0a498 global: support day format options & $day$ title format & /day command
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-12-31 14:54:44 +05:00
Abdullah Atta
2949fcde38 core: fix e2e tests 2025-10-03 13:54:17 +05:00
Abdullah Atta
1a05acbe9a core: fix isProduction always returns false 2025-10-03 09:03:12 +05:00
Abdullah Atta
5ae024f20a Merge branch 'master' into beta 2025-10-02 10:40:56 +05:00
Abdullah Atta
6f80334296 core: fix tests 2025-10-02 09:24:50 +05:00
Abdullah Atta
215ca23190 web: add support for changing plans 2025-09-29 10:02:09 +05:00
Abdullah Atta
fbe551eb29 core: add new subscription types 2025-09-29 10:00:29 +05:00
01zulfi
95795a20c2 core: fix leading spaces in txt export && remove unneeded space at start of txt
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-09-24 09:35:26 +05:00
01zulfi
251145ea74 global: add enable inbox setting to generate/discard inbox key pair (#8527)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-09-09 22:12:44 +05:00
01zulfi
a349611a30 web: fix scroll to search result (#8290)
* web: (wip) fix scroll to search result
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* web: fix scroll to search result
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-07-03 12:16:25 +05:00
01zulfi
1cd21087c2 common: include archive in export (#8279)
* common: include archive in export
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: include archive state in md-frontmatter export
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-07-01 10:25:57 +05:00
Abdullah Atta
e36fd28f47 core: add support for fields in search (#8261)
* core: add support for field based searching

* core: add more fields

* core: add `tagged`, `colored`, `in_notebook` fields
2025-07-01 10:25:57 +05:00
Abdullah Atta
1cf1605564 core: fix small tokens ignored from query 2025-06-17 10:49:42 +05:00
Abdullah Atta
6fccac9aea core: take into account boolean parameters in query 2025-06-16 14:09:45 +05:00
Ammar Ahmed
918824f26b core: skip decodine entities when parsing html 2025-06-16 14:09:27 +05:00
Abdullah Atta
f99ee88499 core: speed up search 2025-06-16 14:09:26 +05:00
Ammar Ahmed
dc7e5dfa50 core: fix stop-words import 2025-06-16 14:09:26 +05:00
Abdullah Atta
4f1bb994f2 core: filter out stop words in search query 2025-06-16 14:09:26 +05:00
Abdullah Atta
0faf267735 core: add raw html content with highlighting in results 2025-06-16 14:08:55 +05:00
Abdullah Atta
66041a45f6 core: add support for highlighting search results 2025-06-16 14:08:55 +05:00
Abdullah Atta
173caf41d0 core: fix query-transformer tests 2025-06-16 14:08:24 +05:00
Abdullah Atta
62b5cc853b core: remove @orama/stopwords 2025-06-16 14:08:24 +05:00
Abdullah Atta
90900628a2 core: strip html when searching notes
this commit also properly fixes search queries containing
words less than 3 characters in length
2025-06-16 14:08:24 +05:00
Abdullah Atta
f6d1f5890a core: wrap query with invalid symbols in quotes 2025-06-16 14:08:24 +05:00
01zulfi
e7ec9e2aa3 web: add support for archiving notes (#7810)
* web: archive notes
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* global: arhives -> archived
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-16 14:05:54 +05:00
01zulfi
bb5d5a5731 core: segregate logic for note headline and note headline title generation (#7968)
* core: segregate logic for note headline and note headline title generation
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: minor refactor note headline title
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-04-29 09:27:35 +05:00
01zulfi
0cc33f7a81 core: fix title generation when title format is set to $headline$ (#7739)
* core: generate headline title until user edit && update headline extraction
* when title format is set to $, keep generating headline title until user manually edits the title
* extract headline from first html tag with content rather than first paragraph

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: extract headline up to 150 chars regardless of html tag
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: improve note headline title code quality
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: remove HEADLINE_CHARACTER_LIMIT constant
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* web: only update title input if note title changes

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2025-04-10 10:17:45 +05:00
Ammar Ahmed
a2a4a165a5 editor: fix item margins in editor (#7744) 2025-03-06 15:49:51 +05:00
01zulfi
76f27adbea web: command palette fixes (#7669)
* web: command palette fixes
* core: add getIdentifier in fuzzy; this allows the caller to provide a custom indentifier instead of relying on id field in the items list
* fix crashing when hitting enter when no results found
* fix commands list not refreshing when removing recent command
* fix recent command not showing up in the commands list
* fix searched commands showing up under wrong group label

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* web: improve getCommandById && improve remove from recents logic
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-03-04 13:11:26 +05:00
Abdullah Atta
9dce39b32d core: reuse fuzzy search logic 2025-02-21 12:29:25 +05:00
Abdullah Atta
80a0b75887 core: remove matchOnly logic from fuzzy searcher
Search should always filter out the results, not return everything.
2025-02-21 12:29:25 +05:00
Abdullah Atta
31e32cd154 core: fix query transformer tests 2025-02-21 12:29:25 +05:00
Ammar Ahmed
4abefe63db core: fix error can't resolve './fuzzy' 2025-02-20 10:49:03 +05:00
01zulfi
a47967dd53 web: add command palette (#7314)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-02-19 15:48:44 +05:00
luis-411
43356e5b6a core: escape special characters in SQL search query (#7418)
Signed-off-by: Luis Kriner <luis@kriner.info>
2025-02-11 11:00:51 +05:00
Ammar Ahmed
abf4612977 core: fix esm imports 2025-01-21 14:32:48 +05:00
01zulfi
e1006ed501 core: add nowz and timestampz formats (#7270)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-01-21 13:17:08 +05:00
Ammar Ahmed
c417d4df91 core: fix DATE_TIME_STRIP_REGEX (#7325) 2025-01-20 10:06:26 +05:00
Abdullah Atta
8c7093189b core: add support for sorting search results
search results are sorted by date created for now until
we add proper support for sorting search results
in the ui
2024-12-23 14:30:45 +05:00
01zulfi
69504a150e core: handle error in parseInternalLink (#7065)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2024-12-10 09:56:47 +05:00
dyw770
a78a2e4ae2 core: fix object-id is sometimes less than 24 chars in length (#6991) (#6994)
Signed-off-by: dyw770 <dyw770@qq.com>
2024-12-06 10:11:57 +05:00
Ammar Ahmed
4ee2923181 mobile: fix attachment downloads failing on mobile 2024-11-23 22:15:57 +05:00
Abdullah Atta
af3fba5176 core: lazily use db in config & kv stores 2024-11-23 13:28:55 +05:00
Abdullah Atta
3150eafb89 core: workaround for tokens shorter than 3 chars 2024-11-19 15:45:40 +05:00