summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Tsung-Han Yu <14802181+johan456789@users.noreply.github.com> 2026-01-21 03:00:39 +0800
committerGravatar GitHub <noreply@github.com> 2026-01-20 20:00:39 +0100
commit84604e0c641f2ede1e9f1becb70968400f7b4fb5 (patch)
tree55d057423278a3917eaa37f2bc2e19b503ad9ced /app
parent63379a6fc2fdf160e00595f7be66742138ba6ce1 (diff)
fix validator url update (#8436)
Closes https://github.com/FreshRSS/FreshRSS/issues/8435 Changes proposed in this pull request: - update validator links to use the same open-url handler with prefix + encoding - ensure the validator link reflects the current #url field value before opening - keep existing open-url behavior for other links unchanged How to test the feature manually: 1. Open feed edit (or add feed) form. 2. Change the feed URL in the URL field. 3. Click “Check the validity of the feed” and verify it opens the validator with the updated URL.
Diffstat (limited to 'app')
-rw-r--r--app/views/feed/add.phtml2
-rw-r--r--app/views/helpers/feed/update.phtml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml
index a30ce19a1..1fd659688 100644
--- a/app/views/feed/add.phtml
+++ b/app/views/feed/add.phtml
@@ -50,7 +50,7 @@
<a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $this->feed->url() ?>" data-input="url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
</div>
<br />
- <a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?= $this->feed->url() ?>"><?= _t('sub.feed.validator') ?></a>
+ <a class="btn open-url" target="_blank" rel="noreferrer" data-input="url" data-prefix="https://validator.w3.org/feed/check.cgi?url=" data-encode="1" href="https://validator.w3.org/feed/check.cgi?url=<?= $this->feed->url() ?>"><?= _t('sub.feed.validator') ?></a>
</div>
</div>
<div class="form-group">
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index 3cdeb3f35..001b88c1f 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -95,7 +95,7 @@
<input type="url" name="url" id="url" value="<?= $this->feed->url() ?>" required="required" />
<a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $this->feed->url() ?>" data-input="url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
</div>
- <a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?=
+ <a class="btn open-url" target="_blank" rel="noreferrer" data-input="url" data-prefix="https://validator.w3.org/feed/check.cgi?url=" data-encode="1" href="https://validator.w3.org/feed/check.cgi?url=<?=
rawurlencode(htmlspecialchars_decode($this->feed->url(), ENT_QUOTES)) ?>"><?= _t('sub.feed.validator') ?></a>
</div>
</div>