mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 02:41:35 +01:00
Render line breaks in change lot HTML representation
This commit is contained in:
@@ -141,9 +141,13 @@
|
|||||||
<button type="submit">Compute diff</button>
|
<button type="submit">Compute diff</button>
|
||||||
</form>
|
</form>
|
||||||
{#if form?.logId === id && form?.currentDiff}
|
{#if form?.logId === id && form?.currentDiff}
|
||||||
<pre>{@html DOMPurify.sanitize(form.currentDiff, {
|
<pre>{@html DOMPurify.sanitize(
|
||||||
ALLOWED_TAGS: ["ins", "del"]
|
// .replace takes escaped text representations of line breaks and converts them to real line breaks that render correctly in HTML
|
||||||
})}</pre>
|
form.currentDiff.replace(/\\r\\n|\\n|\\r/g, "\n"),
|
||||||
|
{
|
||||||
|
ALLOWED_TAGS: ["ins", "del"]
|
||||||
|
}
|
||||||
|
)}</pre>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user