sprintify-ui 0.12.24 → 0.12.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -227,6 +227,22 @@ All components are globally available, you can use them without importation:
227
227
  </script>
228
228
  ```
229
229
 
230
+ ## Rendering HTML safely
231
+
232
+ Never use `v-html` with user-provided content. Use the `v-safe-html` directive instead — it sanitizes the value with [DOMPurify](https://github.com/cure53/DOMPurify) before rendering, stripping scripts, event handlers, `javascript:` URLs, iframes and form elements while keeping rich-text output (links, images, highlights, sub/superscript) intact.
233
+
234
+ The directive is registered globally by the plugin, so migration is mechanical:
235
+
236
+ ```html
237
+ <!-- Before -->
238
+ <div v-html="description" />
239
+
240
+ <!-- After -->
241
+ <div v-safe-html="description" />
242
+ ```
243
+
244
+ The directive (`vSafeHtml`) and its DOMPurify config (`SAFE_HTML_CONFIG`) are also exported for use outside templates.
245
+
230
246
 
231
247
  ## Make changes
232
248