Skip to content

Commit

Permalink
fix: do not sanitize {{prompt-text}}
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Rings authored and Justin Rings committed Sep 5, 2024
1 parent 81f747d commit 9648a07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions express/blocks/gen-ai-cards/gen-ai-cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ async function decorateCards(block, { actions }) {

const hasGenAIForm = promptTokenRegex.test(ctaLinks?.[0]?.href);

// console.log('CTA LINK::', ctaLinks?.[0]?.href);
// console.log('hasGenAIForm::', hasGenAIForm);

if (ctaLinks.length > 0) {
if (hasGenAIForm) {
const genAIForm = buildGenAIForm(cta);
Expand Down
2 changes: 1 addition & 1 deletion express/scripts/utils/content-replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ async function sanitizeMeta(meta) {

// metadata -> dom blades
async function autoUpdatePage(main) {
const wl = ['{{heading_placeholder}}', '{{type}}', '{{quantity}}'];
const wl = ['{{heading_placeholder}}', '{{type}}', '{{quantity}}', '{{prompt-text}}'];
// FIXME: deprecate wl
if (!main) return;

Expand Down

0 comments on commit 9648a07

Please sign in to comment.