-
Notifications
You must be signed in to change notification settings - Fork 29
TASK-8059 - Allow to export Report to a Word Document #1052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: TASK-7645
Are you sure you want to change the base?
Conversation
…raphs. Added methods to parse CSS styles and apply them to Word document elements, including support for font properties, colors, and background styles. Updated existing methods to utilize new styling capabilities for titles, descriptions, and list items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 100 out of 176 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/webcomponents/file/file-delete.js:1
- Debugger statement should be removed before merging to production code.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #htmlToPlainText(html) { | ||
| if (typeof html !== "string") { | ||
| return String(html ?? ""); | ||
| } | ||
| // Use DOMParser to strip HTML tags while keeping text content | ||
| const parser = new DOMParser(); | ||
| const doc = parser.parseFromString(html, "text/html"); | ||
| return doc.body.textContent || ""; | ||
| } |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using DOMParser with unsanitized HTML could be a security concern. Consider validating or sanitizing the HTML input before parsing to prevent potential XSS attacks.
| // Fetch remote image and embed | ||
| try { | ||
| const imageRun = await this.#remoteUrlToImageRun(src, child); |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fetching images from remote URLs without validation could pose security risks. Consider implementing URL validation or using a whitelist of allowed domains before fetching remote images.
| // Fetch remote image and embed | |
| try { | |
| const imageRun = await this.#remoteUrlToImageRun(src, child); | |
| // Validate and fetch remote image and embed | |
| try { | |
| const url = new URL(src, window.location?.origin || undefined); | |
| // Only allow http/https protocols | |
| if (url.protocol !== "http:" && url.protocol !== "https:") { | |
| throw new Error("Disallowed image URL protocol"); | |
| } | |
| // Optional hostname whitelist via wordConfig.allowedImageHosts | |
| const allowedHosts = this.wordConfig?.allowedImageHosts; | |
| if (Array.isArray(allowedHosts) && allowedHosts.length > 0 && !allowedHosts.includes(url.hostname)) { | |
| throw new Error("Disallowed image host"); | |
| } | |
| const imageRun = await this.#remoteUrlToImageRun(url.toString(), child); |
|


No description provided.