456 files
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
import type { MaintenanceObject, MaintenanceTask } from "../types";
|
||||
import { escapeHtml as esc } from "./html-escape";
|
||||
|
||||
export interface ReportLabels {
|
||||
title: string;
|
||||
@@ -35,11 +36,6 @@ export interface ReportLabels {
|
||||
none: string;
|
||||
}
|
||||
|
||||
function esc(v: unknown): string {
|
||||
return String(v ?? "").replace(/[&<>"']/g, (c) =>
|
||||
({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c] as string));
|
||||
}
|
||||
|
||||
export function buildObjectReportHtml(
|
||||
obj: MaintenanceObject,
|
||||
tasks: MaintenanceTask[],
|
||||
|
||||
@@ -32,6 +32,8 @@ export const LS_KEYS = {
|
||||
objectsCache: "msp-objects-cache",
|
||||
gettingStartedDismissed: "msp-gs-dismissed",
|
||||
batteryRosterSort: "ms_bf_roster_sort",
|
||||
/** #191: the areas table's sort column + direction ("cost_year:desc"). */
|
||||
areaSort: "msp-area-sort",
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user