2 Commits
Author SHA1 Message Date
Jarvis 03120d8e19 chore: release 1.0.2
- Update version to 1.0.2 in manifest.json, package.json, and versions.json
- Add CHANGELOG.md entry for security fixes
- Prepare for patch release with XSS vulnerability fixes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 07:43:11 +02:00
Jarvis 178a9e6618 security: fix innerHTML usage in settings to prevent XSS vulnerabilities
Replaces innerHTML usage with Obsidian's safe DOM manipulation methods:
- Line 150: Use createEl() and appendText() for commentary style display
- Lines 159-168: Build usage instructions with createEl() instead of innerHTML

This addresses the Obsidian Review Bot security warning and follows
the official guidelines: https://docs.obsidian.md/Plugins/User+interface/HTML+elements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 07:40:39 +02:00
5 changed files with 33 additions and 15 deletions

No files matched your search

+9 -1
View File
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.0.2] - 2025-01-21
### Security
- Fix innerHTML usage in settings to prevent XSS vulnerabilities
- Replace innerHTML with safe DOM manipulation methods (createEl, appendText)
- Comply with Obsidian security guidelines for plugin development
## [1.0.1] - 2025-09-20
### Changed
@@ -51,6 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Settings Management**: Persistent settings with validation and testing capabilities
- **Modular Architecture**: Clean separation of concerns across services, commands, and API layers
[Unreleased]: https://github.com/alexanderkucera/obsidian-freewriting-cleanup/compare/1.0.1...HEAD
[Unreleased]: https://github.com/alexanderkucera/obsidian-freewriting-cleanup/compare/1.0.2...HEAD
[1.0.2]: https://github.com/alexanderkucera/obsidian-freewriting-cleanup/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/alexanderkucera/obsidian-freewriting-cleanup/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/alexanderkucera/obsidian-freewriting-cleanup/releases/tag/1.0.0
+1 -1
View File
@@ -1,7 +1,7 @@
{
"id": "freewriting-cleanup",
"name": "Freewriting Cleanup",
"version": "1.0.1",
"version": "1.0.2",
"minAppVersion": "1.9.12",
"description": "Use AI to clean up your freewriting typos and create a proper paragraph.",
"author": "Alexander Kucera",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "freewriting-cleanup",
"version": "1.0.1",
"version": "1.0.2",
"description": "Use AI to clean up your freewriting typos and create a proper paragraph.",
"main": "main.js",
"scripts": {
+20 -11
View File
@@ -147,7 +147,9 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
// Show the current preset for reference
const presetText = COMMENTARY_PRESETS[this.plugin.settings.commentaryStyle as Exclude<CommentaryStyle, 'custom'>];
const descDiv = containerEl.createDiv({ cls: 'setting-item-description freewriting-cleanup-description' });
descDiv.innerHTML = `<strong>Selected style:</strong> ${presetText}`;
descDiv.empty();
descDiv.createEl('strong', { text: 'Selected style: ' });
descDiv.appendText(presetText);
}
}
@@ -156,16 +158,23 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
containerEl.createEl('h3', { text: 'Usage Information' });
const usageDiv = containerEl.createDiv();
usageDiv.innerHTML = `
<p><strong>How to use:</strong></p>
<ol>
<li>Select the text you want to clean up in any note</li>
<li>Run the "Clean Up Freewriting" command (Ctrl/Cmd+P)</li>
<li>The cleaned text will appear below your original text</li>
</ol>
<p><strong>Limits:</strong> Maximum 680,000 characters (~150,000 words) per cleanup</p>
<p><strong>Format:</strong> Original text → separator → cleaned text</p>
`;
usageDiv.empty();
const howToUse = usageDiv.createEl('p');
howToUse.createEl('strong', { text: 'How to use:' });
const list = usageDiv.createEl('ol');
list.createEl('li', { text: 'Select the text you want to clean up in any note' });
list.createEl('li', { text: 'Run the "Clean Up Freewriting" command (Ctrl/Cmd+P)' });
list.createEl('li', { text: 'The cleaned text will appear below your original text' });
const limits = usageDiv.createEl('p');
limits.createEl('strong', { text: 'Limits: ' });
limits.appendText('Maximum 680,000 characters (~150,000 words) per cleanup');
const format = usageDiv.createEl('p');
format.createEl('strong', { text: 'Format: ' });
format.appendText('Original text → separator → cleaned text');
// MARK: - Reset Settings
+2 -1
View File
@@ -1,4 +1,5 @@
{
"1.0.0": "1.9.12",
"1.0.1": "1.9.12"
"1.0.1": "1.9.12",
"1.0.2": "1.9.12"
}