首页 > 解决方案 > 如何修复 AMP 页面中的“不允许使用标签 pwa”?

问题描述

最近我开始为一家新企业工作。他们需要我解决他的 AMP 页面上的一些问题。某些脚本或某些东西正在向代码添加 pwa 标记。例如:原始 HTML(CKEditor WYSWYG)

<span style="font-family:nunito"><strong>World-class Fertility Treatment at ReproART Georgian-American Center for Reproductive Medicine, Tbilisi, Georgia</strong></span>

AMP 页面上的结果

<span><strong>World-class Fertility Treatment at <pwa class="pwa-mark pwa-mark-done" data-pwa-category="spelling" data-pwa-dictionary-word="ReproART" data-pwa-heavy="false" data-pwa-hint="Unknown word: ReproART" data-pwa-id="pwa-073BFF40B8214D6BF9CF8C5B1D2CDC29" data-pwa-rule-id="SIMPLE_SPELLING" data-pwa-suggestions="Re-proart~repaired">ReproART</pwa> Georgian-American Center for Reproductive Medicine, Tbilisi, Georgia</strong></span>

AMP 上不允许使用此“pwa”标签,它会导致 Google Search Bot 错误。你们中有人知道这里发生了什么吗?它看起来像是一种拼写和写作校正器,但我不知道是什么脚本在做这件事。

此致。

(已编辑)重要提示:数据库记录包含无效标签。我稍后检查数据库。CKEditor 不显示此标签。

标签: javascripthtmlweb

解决方案


此问题是由使用ProWritingAid的人的复制粘贴文本引起的

可能的解决方案是:

  1. 强制纯文本复制。不推荐。
  2. 在粘贴时应用 removeFormat。CK编辑器
  3. 立即清理您的数据以保存在数据库/文件/WebStorage 上。

推荐阅读