Commit Graph

14 Commits

Author SHA1 Message Date
Nacho Caballero 7d2f5240d9 FIX: Show a correct diff when editing consecutive paragraphs (#8177) 2019-10-11 03:50:37 -04:00
Krzysztof Kotlarek 427d54b2b0 DEV: Upgrading Discourse to Zeitwerk (#8098)
Zeitwerk simplifies working with dependencies in dev and makes it easier reloading class chains. 

We no longer need to use Rails "require_dependency" anywhere and instead can just use standard 
Ruby patterns to require files.

This is a far reaching change and we expect some followups here.
2019-10-02 14:01:53 +10:00
Régis Hanol 134a4c66b7 PERF: limit time spent diffing large blobs of text
REFACTOR: s/.length/.size/g
2019-06-27 01:45:52 +02:00
Régis Hanol 888e68a163 FIX: When mutating a string to build a diff. Duplicate it first
Co-authored-by: Roman Rizzi <rizziromanalejandro@gmail.com>
2019-05-13 09:31:32 +08:00
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Roman Rizzi 9adfd66a8b Revert "FIX: When mutating a string to build a diff. Duplicate it first (#7482)" (#7484)
This reverts commit 20d4093a67.
2019-05-07 16:36:23 +10:00
Roman Rizzi 20d4093a67
FIX: When mutating a string to build a diff. Duplicate it first (#7482) 2019-05-06 13:20:10 -03:00
Régis Hanol 001b0710c7 FIX: don't add diff classes more than once 2018-04-16 15:41:45 +02:00
Kris 2eef9b3295 UX: Adding a sticky footer to the post history modal, removing bootstrap columns 2018-01-29 15:15:50 -05:00
Konrad Borowski 9d737d894d FIX: Don't diplay character reference in HTML diffs (#4204)
* FIX: Don't diplay character reference in HTML diffs

Before this change, HTML escaping was done before splitting text into
tokens, so token splitter saw literals like "&#39;", and split them as
it was normal text into parts into ["&", "#", "39", ";"]. This caused
diff to display character references, as those tokens used separate
HTML tags to display their insertion/deletion status.

* Avoid making one element arrays while generating diffs
2016-05-09 08:44:21 +02:00
Sam Saffron d65efe7304 SECURITY: fix XSS 2014-06-16 10:24:54 +10:00
Régis Hanol e5a189fc17 BUGFIX: broken images in edit history with markdown view 2014-06-13 11:29:10 +02:00
Régis Hanol 206ef3dc08 add discourse_diff tests 2013-12-16 18:11:46 +01:00
Régis Hanol 06dd7ffe3c better revision history 2013-12-12 03:41:34 +01:00