We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf00ebf commit 61c7c51Copy full SHA for 61c7c51
src/views/Posts.vue
@@ -500,7 +500,15 @@ export default {
500
}
501
return true
502
503
- const canSave = () => true
+ const canSave = () => {
504
+ var text = v.posting.post.body_html
505
+ const imgSrcRegex = /<img[^>]+src="((http:\/\/|https:\/\/|\/)[^">]+)"/g
506
+ const stripTagsRegex = /(<([^>]+)>)/ig
507
+ const images = imgSrcRegex.exec(text)
508
+ text = text.replace(stripTagsRegex, '')
509
+ text = text.trim()
510
+ return text.length || images
511
+ }
512
const canMove = () => {
513
if (!$auth.loggedIn) return false
514
if (v.bannedFromBoard) return false
0 commit comments