Problems with link rendering in vue

as in some forums, entering a link will render as a hyperlink, but entering a html snippet will not render as html.

my own vue development, simply replacing the matching link with a tag parsing with v-html will have security problems.

Xiaobai, let"s ask for some ideas

Jul.23,2021

first of all, the user enters the string, and the page finally outputs the Vue component. All you have to do is implement a process of converting the string to VNode List (dynamic component).

then, you can tell whether the user enters a URL or a HTML,. For URL, replace it with or a linked component; for HTML,sanitize, just output the string. This process has nothing to do with v-html.

of course, if the final display of the page does not involve Vue, it is nothing more than a matter of converting it all to HTML strings, and the process is roughly the same. Whether it is safe or not depends on how you sanitize.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea6659-1dd0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea6659-1dd0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?