Commit Graph

434 Commits (6c0b11aef5f1e2118ec0aa66db317e280dccb648)

Author SHA1 Message Date
Bob Mottram e0aac3c6a3 Separate function for extracting domain name 2021-06-23 22:31:50 +01:00
Bob Mottram 80f43a728a Spaces 2021-06-22 13:42:52 +01:00
Bob Mottram cd008c3013 Revert "Reading functions"
This reverts commit ee0ffade9d.
2021-06-21 23:52:04 +01:00
Bob Mottram ee0ffade9d Reading functions 2021-06-21 23:34:46 +01:00
Bob Mottram 546dda34bb Argument types 2021-06-20 12:28:35 +01:00
Bob Mottram e7ae1c0561 Importing themes 2021-05-29 12:04:03 +01:00
Bob Mottram 0ce6c608ed Don't remove + from fields 2021-05-20 10:41:36 +01:00
Bob Mottram eb9135ac3e Another long lines failure case 2021-03-17 21:17:27 +00:00
Bob Mottram 3b5dba87c3 Tidying of encrypted message detection 2021-03-12 12:04:34 +00:00
Bob Mottram b7c1b02346 Decrypt pgp encrypted DMs 2021-03-11 17:15:32 +00:00
Bob Mottram 3e7e64f5d0 Debug 2021-03-06 23:19:03 +00:00
Bob Mottram 6b2f22d562 Check that media file is written 2021-03-06 23:16:54 +00:00
Bob Mottram 6b3feec7aa Allow semicolons in some other fields 2021-03-01 12:19:49 +00:00
Bob Mottram fdc9c0ab62 Allow semicolons in some other fields 2021-03-01 12:15:06 +00:00
Bob Mottram 6baef31a36 Bring the payload back 2021-03-01 10:06:13 +00:00
Bob Mottram f76c173f59 Don't use payload function when parsing form-data 2021-03-01 10:02:55 +00:00
Bob Mottram 460b8bd938 Only one truncation 2021-02-13 12:26:25 +00:00
Bob Mottram 58ba1146a4 Remove only the last character 2021-02-13 12:17:03 +00:00
Bob Mottram ab6994329a Remove endings from hashtags 2021-02-13 12:12:06 +00:00
Bob Mottram 0826326653 Validation of categories 2021-02-09 22:42:29 +00:00
Bob Mottram 2e6fe854f8 More checks 2021-02-09 22:29:57 +00:00
Bob Mottram 890c8856a8 More thorough validation of hashtags and nicknames 2021-02-09 14:41:32 +00:00
Bob Mottram 7de4e24f2e Latin-script special characters are valid 2021-02-09 13:28:42 +00:00
Bob Mottram 00af89ff3e More hashtag checks 2021-02-09 13:16:53 +00:00
Bob Mottram 74a8e39509 Check for invalid hashtag 2021-02-08 21:31:18 +00:00
Bob Mottram f528171090 Check that petname exists 2021-02-04 13:43:56 +00:00
Bob Mottram 8bbd9b6173 Check for dangerous markup in display name and clearly indicate adversaries 2021-01-31 11:05:17 +00:00
Bob Mottram bdfeb8f993 Increment follow counter 2021-01-29 21:34:08 +00:00
Bob Mottram 9195e57c13 Fallback mentions replacement 2021-01-29 21:33:23 +00:00
Bob Mottram 419353ccf9 Version 1.2.0 2021-01-26 10:07:42 +00:00
Bob Mottram 1bb4eab631 Support for svg format images 2021-01-11 22:27:57 +00:00
Bob Mottram 5cd9aa8d66 Enforce convention of underscore before local function names 2020-12-22 18:06:23 +00:00
Bob Mottram a7b094f84f Test for stranded functions which aren't called 2020-12-22 12:59:46 +00:00
Bob Mottram 88b0a6aa6f Check if tag already exists 2020-12-13 20:07:45 +00:00
Bob Mottram 11883701ab No imports of unchecked css 2020-12-12 21:42:10 +00:00
Bob Mottram 76eb19b311 Check for non-local web links in css 2020-12-12 21:21:06 +00:00
Bob Mottram 49091dea9f Dissallow regular expressions in css 2020-12-12 20:59:52 +00:00
Bob Mottram 5dfd647f81 Check for localhost links in css 2020-12-12 20:55:33 +00:00
Bob Mottram 249cc1ab5a reject localhost in markup 2020-12-12 20:53:16 +00:00
Bob Mottram 5031d6bf78 Standardize rel 2020-12-11 10:14:58 +00:00
Bob Mottram af76a5809e Check for enabling scripts or popups 2020-12-11 10:02:23 +00:00
Bob Mottram 9e483bdacf Don't remove radicle links 2020-12-06 10:18:41 +00:00
Bob Mottram c0eedb0716 Ensure that text fields from POST are unquoted 2020-12-03 14:59:07 +00:00
Bob Mottram 30ebfda697 Tidy up the handling of media formats 2020-11-21 11:54:29 +00:00
Bob Mottram 5364b71616 Option to allow access to the local network
This might be useful for mesh networks or private networks
2020-11-20 10:58:49 +00:00
Bob Mottram be45c71e12 Anything coming from google - fonts, etc - is bad 2020-11-15 11:26:23 +00:00
Bob Mottram 079e893385 Convert to lower case 2020-11-15 11:14:26 +00:00
Bob Mottram 9726a63c33 Extra checks on css 2020-11-15 11:01:05 +00:00
Bob Mottram cadd0de15c Don't allow local network access 2020-11-11 09:42:48 +00:00
Bob Mottram cb49d90bb9 Removing long words from feed titles 2020-10-31 23:10:38 +00:00
Bob Mottram 37e188b0a3 Indentation 2020-10-30 12:12:09 +00:00
Bob Mottram 26c490757d Check for balanced quotes 2020-10-30 12:10:57 +00:00
Bob Mottram 1b24bc664a Only html format quotes if there are a few
If there are lots then things can get out of hand
2020-10-30 12:03:29 +00:00
Bob Mottram 3fd0723684 Remove html before checking for hashtags 2020-10-25 12:47:16 +00:00
Bob Mottram c691cff82d Add hashtag interpreter 2020-10-17 13:05:41 +01:00
Bob Mottram af3b7baf12 Extract hashtags from newswire feeds 2020-10-16 21:13:23 +01:00
Bob Mottram a60491585e Extract hashtags from feeds 2020-10-16 20:49:34 +01:00
Bob Mottram abcda1af1e Revert 2020-10-11 11:31:26 +01:00
Bob Mottram f3c1482e87 Image width 2020-10-11 11:25:19 +01:00
Bob Mottram caafb4648c Set image width if it exists 2020-10-11 11:10:19 +01:00
Bob Mottram 82a89aa216 Don't tag podcasts as music 2020-10-11 10:50:17 +01:00
Bob Mottram 13c067bfa4 Remove dangerous markup from rss feeds 2020-10-11 10:33:31 +01:00
Bob Mottram 3fe7a8c498 Tidying 2020-09-30 23:55:53 +01:00
Bob Mottram 463192242f Fix test 2020-09-30 23:52:39 +01:00
Bob Mottram ce1067d1a9 Replace quotes 2020-09-14 13:17:11 +01:00
Bob Mottram 08b6d14400 Style of quoted paragraphs 2020-09-14 12:30:56 +01:00
Bob Mottram 488ef5b34d Extra blockquote check 2020-09-14 11:25:12 +01:00
Bob Mottram 21573b6ca7 Turn email style quotes into blockquotes 2020-09-14 10:33:42 +01:00
Bob Mottram 08c18607d0 Automatically add hashtags 2020-09-13 15:42:17 +01:00
Bob Mottram e12b6483c3 Support AVIF image format
See https://jakearchibald.com/2020/avif-has-landed
2020-09-09 16:09:38 +01:00
Bob Mottram 2f2034d0ec Long hashtags are invalid 2020-08-07 21:43:54 +01:00
Bob Mottram 8565f362e6 Better handling of quotes 2020-08-03 18:03:30 +01:00
Bob Mottram 323cb4a91b Replace quotes 2020-08-02 20:16:22 +01:00
Bob Mottram d58e4519d7 Quotes replacement 2020-08-02 19:30:35 +01:00
Bob Mottram 853ef7af2e Replace quotes 2020-08-02 19:09:50 +01:00
Bob Mottram 1ba6861e88 Only do quotes substitution with html 2020-08-02 18:27:56 +01:00
Bob Mottram 5efc685220 Avoid adding quites within markup 2020-08-02 18:17:51 +01:00
Bob Mottram 3c86717fc6 Use html formatting for quotes 2020-08-02 18:01:12 +01:00
Bob Mottram 3f44e0c881 Valid markup go br 2020-07-10 15:43:27 +01:00
Bob Mottram 1a15d07dfd Improve checking for bad markup 2020-07-10 14:15:01 +00:00
Bob Mottram 4c14d4a649 Remove html from searched profile descriptions 2020-07-07 15:18:02 +01:00
Bob Mottram 36994134c2 Function not needed 2020-06-26 10:42:24 +00:00
Bob Mottram 125ead6f8b Function to extract mentions as a string 2020-06-26 09:11:47 +00:00
Bob Mottram 2d5f3276f6 Tidying 2020-06-14 14:39:03 +01:00
Bob Mottram 5ba0e38090 Remove formatting such as bold and italics from posts
This is to be conformant with what Mastodon is doing. Probably markdown should be an optional extra
2020-06-14 14:25:38 +01:00
Bob Mottram 6e769484aa Reduce duplicate prefixes 2020-06-11 13:26:15 +01:00
Bob Mottram 136949752f Tidying 2020-06-11 12:56:08 +01:00
Bob Mottram 353f87f1aa Sanity check for adding links 2020-06-11 10:43:48 +01:00
Bob Mottram 585735d25b Link briar addresses 2020-06-11 10:04:10 +01:00
Bob Mottram 22699afa53 Web links for various formats 2020-06-11 09:55:58 +01:00
Bob Mottram bee0d99ce6 Support for gnunet 2020-06-09 12:51:51 +01:00
Bob Mottram 3e9948374c Remove unused font upload code 2020-05-28 09:52:25 +01:00
Bob Mottram d2f7a4e210 Font mime types according to mozilla documentation 2020-05-26 22:52:36 +01:00
Bob Mottram aacbf8cbb9 Detecting font files 2020-05-26 20:29:15 +01:00
Bob Mottram 7cd33447ca Detect start of font file 2020-05-26 20:07:04 +01:00
Bob Mottram c7c2866220 Detect font binaries 2020-05-26 20:05:03 +01:00
Bob Mottram a01bc05634 Handle font extensions 2020-05-26 16:08:43 +01:00
Bob Mottram e75f1a0abb Remove carriage returns 2020-05-22 11:32:38 +00:00
Bob Mottram 4608678cae Support hypercore protocol 2020-05-17 10:37:59 +01:00
Bob Mottram aa289fda8a Check for duplicate brackets in content 2020-05-12 10:42:24 +01:00
Bob Mottram 315afa4bd8 Extra checks for bad content format 2020-05-12 10:34:58 +01:00
Bob Mottram 0f1ad061ec Also support gopher links 2020-05-06 16:15:03 +01:00
Bob Mottram 80936d88a3 Turn gemini url into links 2020-05-06 15:46:27 +01:00
Bob Mottram dbcfbd1a8c flake8 style 2020-04-02 09:56:17 +00:00
Bob Mottram f9e8c09826 Decrease line lengths 2020-03-29 09:59:54 +00:00
Bob Mottram 23bb250deb Remove trailing whitespace 2020-03-22 21:16:02 +00:00
Bob Mottram d0884fa04d Tidying 2020-03-22 20:36:19 +00:00
Bob Mottram 494a9ea94c Allow for tox addresses 2020-03-22 14:29:34 +00:00
Bob Mottram 373c65a103 Code sequence 2020-02-21 21:11:52 +00:00
Bob Mottram 29783f7bf4 Sequence of emoji codes 2020-02-21 21:08:24 +00:00
Bob Mottram 4173ea679e Exception handling 2020-02-21 18:13:09 +00:00
Bob Mottram 691b14a3e7 Extra emoji checks 2020-02-21 17:45:20 +00:00
Bob Mottram caf3c31472 Tidying 2020-02-21 17:09:09 +00:00
Bob Mottram 2b6aa3f44b Convert hex to char 2020-02-21 16:58:33 +00:00
Bob Mottram 205ff8b5cb Replace tags with unicode characters 2020-02-21 15:09:31 +00:00
Bob Mottram cc0b6f48e2 Extra emoji fields 2020-02-21 10:19:02 +00:00
Bob Mottram 541f4d9c13 Remove quotes later
This allows things like leading or trailing spaces to be matched
2020-02-19 19:36:41 +00:00
Bob Mottram 5a87a60114 Replace quotes 2020-02-19 18:59:42 +00:00
Bob Mottram 6bed85c595 Switch words in html 2020-02-19 18:51:08 +00:00
Bob Mottram dfdf4c032e Support use on i2p addresses 2020-02-17 17:18:21 +00:00
Bob Mottram 25b22b206b Extra exceptions 2020-01-25 10:49:59 +00:00
Bob Mottram 1bb4e08c35 Another test case for long text 2020-01-24 11:27:12 +00:00
Bob Mottram f6acc62b16 Version 1.1.0 2019-12-14 10:52:19 +00:00
Bob Mottram 29558dabb1 Handle single long lines with no spaces 2019-12-13 12:41:26 +00:00
Bob Mottram 6df175a641 Filename 2019-12-12 18:14:55 +00:00
Bob Mottram f029c07a61 Create etag at time of media upload 2019-12-04 18:52:27 +00:00
Bob Mottram 9de4fc04c1 Remove excess references to commentjson 2019-11-23 10:08:00 +00:00
Bob Mottram 2f9ae10f83 temp 2019-11-14 14:29:17 +00:00
Bob Mottram 109d184f54 jpg extension 2019-11-14 14:03:01 +00:00
Bob Mottram adae51b090 Remove stray variable 2019-11-14 14:01:26 +00:00
Bob Mottram b94d1e3877 Support different image formats 2019-11-14 13:30:54 +00:00
Bob Mottram cae6637b24 Profile updates supporting utf-8 2019-11-10 13:31:55 +00:00
Bob Mottram 1f68f22925 More debug 2019-11-10 11:54:45 +00:00
Bob Mottram f1ca34bac8 Encode the boundary 2019-11-10 11:45:31 +00:00
Bob Mottram 3bd0646c6c utf8 encoding 2019-11-10 11:42:49 +00:00
Bob Mottram 95a11cccbb Refactoring receiving of posts 2019-11-10 11:37:24 +00:00
Bob Mottram 41f7dc4d51 Check for repeats 2019-11-04 21:11:09 +00:00
Bob Mottram b703a98b8f @ 2019-11-04 21:08:43 +00:00
Bob Mottram e742e3ccbc quote 2019-11-04 21:00:55 +00:00
Bob Mottram 90197046b3 Fixed separator 2019-11-04 20:57:41 +00:00
Bob Mottram 83386fd2a3 Test for = 2019-11-04 20:52:19 +00:00
Bob Mottram 75a867ea23 Test with backslash 2019-11-04 20:51:07 +00:00
Bob Mottram b636d6d287 Extra check 2019-11-04 20:49:19 +00:00
Bob Mottram ba5608c705 No suffix 2019-11-04 20:45:10 +00:00
Bob Mottram ed2e97ab55 Try to remove long words 2019-11-04 20:39:14 +00:00
Bob Mottram 4e84f2c331 Comments 2019-11-03 14:46:30 +00:00
Bob Mottram e585424814 Check for valid handle 2019-10-29 20:15:21 +00:00
Bob Mottram 14d7e2e2b2 Don't replace emoji within json content 2019-10-29 13:04:38 +00:00
Bob Mottram e7f377698a Catch all commentjson load errors 2019-10-26 14:01:32 +01:00
Bob Mottram 5f94b413a7 json loading error handling 2019-10-26 13:47:27 +01:00
Bob Mottram cf2be50b48 commentjson exceptions 2019-10-26 13:19:34 +01:00
Bob Mottram 65227e7c59 Don't trunkate web links 2019-10-25 19:27:32 +01:00
Bob Mottram 5a002e7d5e Tidying 2019-10-18 13:24:31 +01:00
Bob Mottram c0361bd5bf Convert exception to string 2019-10-17 11:26:56 +01:00
Bob Mottram f056c811be More debug for commentjson 2019-10-17 10:40:31 +01:00
Bob Mottram 45c7896627 More debug 2019-10-16 15:21:01 +01:00
Bob Mottram 714f34609d Tidying 2019-10-12 13:55:05 +01:00
Bob Mottram 48c5424e33 More retries 2019-10-12 10:37:21 +01:00
Bob Mottram 9f5bf60af0 Indentation 2019-10-09 19:34:59 +01:00
Bob Mottram 9ad5b34002 No second colon 2019-10-09 19:32:53 +01:00
Bob Mottram ffd290b681 Debug 2019-10-09 19:26:54 +01:00
Bob Mottram 30dfa77774 Debug 2019-10-09 19:16:06 +01:00
Bob Mottram 2edff7aa2e Debug 2019-10-09 19:11:54 +01:00
Bob Mottram de15578d17 Detection of emoji 2019-10-09 19:05:24 +01:00
Bob Mottram 4736d144f4 Tidying 2019-10-09 13:23:20 +01:00
Bob Mottram de2b62ab5f Remove very long words 2019-10-09 13:19:17 +01:00
Bob Mottram 7b29c456b9 Include ending after ellipsis 2019-10-01 11:47:47 +01:00
Bob Mottram 3d9398609c Linebreaks with extra space 2019-10-01 11:36:51 +01:00
Bob Mottram 708f1d8a2a Support dat links 2019-10-01 09:54:52 +01:00
Bob Mottram 430df2480e Convert to string 2019-09-29 20:51:12 +01:00
Bob Mottram 4f0db03374 Fix indentation 2019-09-29 20:45:19 +01:00
Bob Mottram bacc06f416 emoji replacement 2019-09-29 18:42:51 +01:00
Bob Mottram 1b15e9ff43 Separate tag replacement functions 2019-09-29 18:20:10 +01:00
Bob Mottram 4f39a0c7df Handle tag dictionary 2019-09-29 17:48:07 +01:00
Bob Mottram 10d239ef2e Insert emoji 2019-09-29 17:28:02 +01:00
Bob Mottram 2918582753 Only call function if needed 2019-09-29 16:57:54 +01:00
Bob Mottram 3ed5e83a90 More description 2019-09-29 16:49:08 +01:00
Bob Mottram c8d25f85cb Loading emoji 2019-09-29 15:48:17 +01:00
Bob Mottram 7c497bb323 Add music emoji to music links 2019-09-24 10:27:34 +01:00
Bob Mottram 0580bd86de Remove argument 2019-09-23 12:36:54 +01:00
Bob Mottram 218693f7b1 Replace emoji tags 2019-09-23 12:34:24 +01:00
Bob Mottram a8689b749c Replacing emoji 2019-09-23 12:22:15 +01:00
Bob Mottram 6611702ee1 Comments 2019-09-23 12:11:13 +01:00
Bob Mottram d39dfa3f47 Tidying 2019-09-23 12:07:01 +01:00
Bob Mottram b8da814892 Handle emoji with trailing chatacters 2019-09-23 11:32:04 +01:00
Bob Mottram b92f4570a9 Avoid duplicates 2019-09-22 18:54:33 +01:00
Bob Mottram 50e9417d87 Prevent links from becoming too long 2019-09-18 09:37:42 +01:00
Bob Mottram e0d29fff81 Add music tags first 2019-09-05 11:29:09 +01:00
Bob Mottram 158465603e music links at end of function 2019-09-05 11:26:08 +01:00
Bob Mottram 92a17cce93 Extra space 2019-09-05 11:23:22 +01:00
Bob Mottram bd79e2e694 Handle newlines when adding tags 2019-09-05 11:17:58 +01:00
Bob Mottram 063749a1cb Add extra space 2019-09-05 11:08:05 +01:00
Bob Mottram 966560beea Add music tags 2019-09-05 10:54:27 +01:00
Bob Mottram 565bf041e2 Handle newlines when adding links 2019-09-01 09:55:05 +01:00
Bob Mottram 779fc287d1 Version 1.0.0 2019-08-29 14:35:29 +01:00
Bob Mottram 828ed9f9e8 s 2019-08-21 13:29:30 +01:00
Bob Mottram 1cbf264e37 Add web links 2019-08-21 13:07:30 +01:00
Bob Mottram 64a4048002 Emoji tag icon 2019-08-19 14:35:55 +01:00
Bob Mottram bc7f1ef8dd Emoji image replacement 2019-08-19 13:59:57 +01:00
Bob Mottram ec6dea1c58 Remove debug 2019-08-19 13:42:24 +01:00
Bob Mottram cf96d38b9d Add mention tags 2019-08-19 13:13:18 +01:00
Bob Mottram e9df539727 Return tags as a list 2019-08-19 13:06:03 +01:00
Bob Mottram 099040db75 Add mention tags 2019-08-19 12:49:34 +01:00
Bob Mottram 984712ab45 Handle mentions even if not following 2019-08-19 12:41:15 +01:00
Bob Mottram fc0d1ab8a5 words list 2019-08-19 12:22:05 +01:00
Bob Mottram 7413536531 Debug 2019-08-19 12:19:32 +01:00
Bob Mottram f59eb08b14 Create word array 2019-08-19 12:14:38 +01:00
Bob Mottram 273956c3e8 Tidying 2019-08-19 12:11:31 +01:00
Bob Mottram 6373e8b982 Typo 2019-08-19 12:08:47 +01:00
Bob Mottram 68b2c7632a Handle . within content when extracting tags 2019-08-19 12:07:04 +01:00
Bob Mottram 40805f2ae0 Don't replace . 2019-08-19 12:02:35 +01:00
Bob Mottram da316ef4d3 More debug 2019-08-19 11:56:49 +01:00
Bob Mottram 9f06738447 Debug 2019-08-19 11:48:59 +01:00
Bob Mottram 2923e74db1 Tidying 2019-08-19 11:46:23 +01:00
Bob Mottram 021048950f Tidying 2019-08-19 11:43:52 +01:00
Bob Mottram 072481cc2b Check the domain looks like a domain when extracting mentions 2019-08-19 11:13:09 +01:00
Bob Mottram 470f32382a Detecting mentions for @nick@domain 2019-08-19 11:05:50 +01:00
Bob Mottram 9c8131e362 Directly use a json file for emoji lookup 2019-08-11 18:16:42 +01:00
Bob Mottram 90f30447d0 Document customizations 2019-08-11 17:55:22 +01:00
Bob Mottram 220f5683b9 Fix tags 2019-08-10 17:55:17 +01:00
Bob Mottram 1e08a9143a Emoji spacing 2019-08-09 19:48:40 +01:00
Bob Mottram de382b87a4 Alignment of emoji 2019-08-09 18:42:11 +01:00
Bob Mottram 5ed5aa0d33 Emoji in posts 2019-08-09 17:18:00 +01:00
Bob Mottram 52162d1b9b Add hashtag conversion to html 2019-08-09 12:12:08 +01:00
Bob Mottram 9976e016b1 Handle mentions without domains 2019-08-09 10:48:51 +01:00
Bob Mottram d769c5b258 Run test in its own subdirectory 2019-08-09 10:46:33 +01:00
Bob Mottram af32aa08d6 Refactor mentions replacements 2019-08-09 10:09:21 +01:00
Bob Mottram b48080dad2 Variable name 2019-08-05 20:20:13 +01:00
Bob Mottram 19ae236665 Include mentions in new posts 2019-08-05 20:13:15 +01:00
Bob Mottram e5803ae454 More recipients from mentions 2019-08-05 18:20:38 +01:00
Bob Mottram 88b0b13ddc Also send to mentioned recipients 2019-08-05 17:56:32 +01:00
Bob Mottram 7a1a870e9e paragraph 2019-07-15 15:30:38 +01:00
Bob Mottram 64eb4212b7 Handle domains with ports 2019-07-15 15:24:33 +01:00
Bob Mottram e6b9a74ee4 mentions function 2019-07-15 15:11:31 +01:00