Commit 1cb3cb9
committed
fix: validate secondary_link URL when value is present
The URL validation loop skipped secondary_link entirely due to an
overly broad exclusion (`field != "secondary_link"`). This meant a
secondary_link containing spaces or missing the https:// scheme
would pass validation silently.
Change the condition so that empty optional fields are skipped (via
`continue`), but non-empty values are always validated regardless of
which field they belong to. The required-field check earlier in the
function already ensures primary_link and author_link are present.1 parent 56d5afd commit 1cb3cb9
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
0 commit comments