[WordPress] 外掛分享: Safe Paste

前言介紹

  • 這款 WordPress 外掛「Safe Paste」是 2012-09-21 上架。
  • 目前有 200 個安裝啟用數。
  • 上一次更新是 2020-04-10,距離現在已有 2148 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 有 5 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

samuelaguilera |

外掛標籤

html | editor | tinyMCE | strip tags | post content |

內容簡介

WordPress在默認情況下會過濾您內容中的潛在危險代碼。因此,這個插件不是關於安全的問題。

但是人們可以在不危及您的安全的情況下破壞您的網站設計......這就是這個小插件的目的。

您有為您創建內容的用戶嗎?您擁有一個在線雜誌吗?

如果您對以上任何一個問題回答是肯定的,我相信您的用戶在複製/粘貼時使用了所有HTML標記而不知道它們的所有HTML標記,因此您的網站可能會遭受一些小型的設計問題......

此插件只是在將帖子和頁面內容插入到數據庫之前從中刪除很多HTML標記(和非斷開空格HTML實體)。從而防止用戶(包括您)將不需要的HTML標記粘貼到內容中。

它只會在您編輯帖子/頁面時進行工作(可以處於任何狀態)。因此,當您啟用插件時,它會對您創建的新帖子/頁面和您啟用插件後編輯的舊內容進行處理。

這些是剩下的HTML標記:

<p>
<a>(允許的屬性:href,title)。
<img>(允許的屬性:src,alt,class)
<h1> 
<h2> 
<h3>
<h4> 
<h5> 
<h6> 
<blockquote>
<ol>
<ul>
<li>
<em>
<strong>
<del>
<code>
<ins>

任何其他HTML標記(或屬性)和&nbsp;(非斷開空格)都應被刪除。

具有“unfiltered_html” WP核心功能的用戶(默認情況下為管理員和編輯角色)將被排除在過濾器之外。

注意:本程式根據GPL2許可證發布,希望能夠有所幫助,但是沒有任何保證。我不對您的網站由於使用此插件而可能遭受的任何麻煩或損壞負責。您和您自己負責您的網站以及擁有備份和恢復計劃。如果您使用此插件,您即表示接受此條款。

功能

KISS原則🙂

要求

WordPress 4.x或更高版本。

原文外掛簡介

WordPress do a great job by default filtering potentially dangerous code inside your content. So this plugin is NOT about security.
But people can break your site design without compromising your security… That’s the purpose of this little plugin.
Do you have users that creates content for you?. Do you own an online Magazine?
If you answer yes to at least one of the above questions, I’m sure you have minor design troubles in your site because of your users using copy/paste (ofcourse without using TinyMCE buttons to remove code) while not being aware of all the HTML tags they are pasting…
This plugin simply removes a lot of HTML tags (and non breaking space HTML entitie) from post and page content before inserting it to database. Preventing users (including you) to paste undesired HTML tags to the content.
It only does his work while you’re editing your post/page (it can be in any status). So it’ll do the job on the new post/pages you create after the activation of the plugin and in old content that you edit after the plugin activation.
These are the HTML tags that stays:

(allowed attributes: href, title).
(allowed attributes: src, alt, class).

文章
Filter
Mastodon