Javi Martín
68ca29fa8b
Convert markdown to HTML on demand
...
We were converting markdown to HTML every time we saved a record, which
has the same problems as sanitizing HTML before saving it to the
database, particularly because the body of a legislation draft is stored
in a translations table.
Performance-wise this isn't a problem: converting a text with more than
200_000 characters takes about a milisecond on my machine.
Note we need to modify a migration generated by globalize, since the
method `create_translation_table!` would fail now that we don't define
`translates :body_html` in the model.
2019-10-21 21:32:43 +02:00
..
2019-10-18 16:24:27 +02:00
2019-09-10 21:04:56 +02:00
2019-04-17 17:40:56 +02:00
2019-10-21 21:32:02 +02:00
2019-04-17 17:40:56 +02:00
2019-10-21 21:32:02 +02:00
2019-03-14 17:25:43 +01:00
2019-08-28 20:32:40 +02:00
2019-10-21 21:32:43 +02:00
2019-09-10 21:04:56 +02:00
2019-04-17 17:40:56 +02:00
2019-07-29 13:10:09 +02:00
2019-10-21 21:32:02 +02:00
2019-09-10 21:43:39 +02:00
2019-09-10 21:43:39 +02:00
2019-09-10 20:02:15 +02:00
2015-07-15 13:32:13 +02:00
2019-09-20 12:51:26 +02:00
2019-04-17 17:40:56 +02:00
2019-09-10 21:04:56 +02:00
2019-09-10 21:43:39 +02:00
2019-04-29 13:08:43 -05:00
2019-06-05 16:18:12 +02:00
2019-04-17 17:40:56 +02:00
2019-04-17 17:40:56 +02:00
2019-06-12 18:03:53 +02:00
2019-06-12 18:03:53 +02:00
2019-06-12 18:03:53 +02:00
2019-06-12 18:03:53 +02:00
2019-10-21 21:32:02 +02:00
2019-04-17 17:40:56 +02:00
2019-09-10 20:02:15 +02:00
2019-06-27 09:19:37 +02:00
2019-09-10 20:02:15 +02:00
2019-03-27 15:22:14 +01:00
2019-09-10 21:43:39 +02:00
2019-08-28 20:32:40 +02:00
2019-09-10 20:02:15 +02:00
2019-09-10 20:02:15 +02:00
2019-08-07 13:53:27 +02:00
2019-06-05 17:02:59 +02:00
2019-04-17 17:40:56 +02:00
2019-09-10 21:43:39 +02:00
2019-04-17 17:40:56 +02:00
2019-08-27 17:22:22 +02:00
2019-04-17 17:40:56 +02:00
2019-09-24 19:29:46 +02:00
2019-04-17 17:40:56 +02:00
2019-06-04 11:50:09 +02:00
2019-03-14 17:25:43 +01:00
2019-04-29 13:08:43 -05:00
2019-07-29 13:07:24 +02:00
2019-04-17 17:40:56 +02:00
2019-04-17 17:40:56 +02:00
2019-05-28 14:26:18 +02:00
2019-10-10 02:35:20 +02:00
2019-04-17 17:40:56 +02:00
2019-09-10 21:43:39 +02:00
2019-09-10 20:02:15 +02:00
2019-04-17 17:40:56 +02:00
2019-09-26 19:58:02 +02:00
2019-06-27 09:19:37 +02:00
2019-09-10 21:43:39 +02:00
2019-10-05 03:38:44 +02:00
2019-04-17 17:40:56 +02:00
2019-09-10 20:02:15 +02:00
2019-06-27 09:21:18 +02:00
2019-05-22 11:50:03 +02:00
2019-10-20 14:52:07 +02:00
2019-09-10 21:04:56 +02:00
2019-09-10 20:02:15 +02:00
2019-03-14 17:25:43 +01:00
2019-05-21 13:50:19 +02:00
2019-10-05 03:38:44 +02:00
2019-02-05 17:41:00 +01:00
2019-04-17 17:40:56 +02:00
2019-09-10 21:43:38 +02:00
2019-09-10 21:04:56 +02:00
2019-04-17 17:40:56 +02:00
2019-09-26 19:58:02 +02:00
2019-04-17 17:40:56 +02:00
2019-04-17 17:40:56 +02:00
2019-06-12 19:32:41 +02:00
2019-09-10 21:43:39 +02:00
2017-12-15 19:21:02 +01:00
2019-04-17 17:40:56 +02:00