LDDG Posted August 31, 2017 Posted August 31, 2017 When creating an article in IP.Content, I want to prevent members from being able to use quotes in a post's title. How can I use a custom input validation entry to make this happen?
Joy Rex Posted August 31, 2017 Posted August 31, 2017 You mean actual quotation marks, or the BBCode quote tag?
LDDG Posted September 1, 2017 Author Posted September 1, 2017 7 hours ago, Joy Rex said: You mean actual quotation marks, or the BBCode quote tag? Sorry, should have been more specific. The actual quotation mark. I believe this is done with a RegEx but I don't know how to construct the RegEx in order to exclude quotation marks.
Joy Rex Posted September 1, 2017 Posted September 1, 2017 19 hours ago, LDDG said: Sorry, should have been more specific. The actual quotation mark. I believe this is done with a RegEx but I don't know how to construct the RegEx in order to exclude quotation marks. http://www.regexr.com/ More specifically, this StackOverflow thread has your solution: /['"]+/g, '' https://stackoverflow.com/questions/19156148/i-want-to-remove-double-quotes-from-a-string See the answer with around 176+ upvotes for a detailed explanation on how this RegEx works. Let us know if that solved your issue!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.