Country map popup: the Pray and Full Profile links are escaped like every other value in it
popupHtml() escaped the name, the subtitle, the stats, the description, the photo address and the two button labels, but put prayUrl and profileUrl into href raw. Both end in the people group's slug, which comes from the API, so a slug with a double quote would close the attribute. Both now go through the escapeHtml the popup already uses. Found by the regions plugin, which fixed the same inherited code in its dx-maps port.
This commit is contained in:
parent
719c8bb218
commit
bf5568f771
1 changed files with 2 additions and 2 deletions
|
|
@ -154,8 +154,8 @@ function popupHtml(p: any): string {
|
|||
${rows.length ? `<dl class="cm-popup__stats">${rows.join('')}</dl>` : ''}
|
||||
${p.description ? `<p class="cm-popup__desc">${escapeHtml(p.description)}</p>` : ''}
|
||||
<div class="cm-popup__actions">
|
||||
<a class="cm-popup__btn cm-popup__btn--primary" href="${prayUrl}">${escapeHtml(t('Pray'))}</a>
|
||||
<a class="cm-popup__btn" href="${profileUrl}">${escapeHtml(t('Full Profile'))}</a>
|
||||
<a class="cm-popup__btn cm-popup__btn--primary" href="${escapeHtml(prayUrl)}">${escapeHtml(t('Pray'))}</a>
|
||||
<a class="cm-popup__btn" href="${escapeHtml(profileUrl)}">${escapeHtml(t('Full Profile'))}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
|
|
|
|||
Loading…
Reference in a new issue