mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
parent
6ac905f264
commit
369bad01b8
@ -104,6 +104,7 @@ module.exports = function(RED) {
|
||||
* @returns `true` if it is a valid topic
|
||||
*/
|
||||
function isValidPublishTopic(topic) {
|
||||
if (topic.length === 0) return false;
|
||||
return !/[\+#\b\f\n\r\t\v\0]/.test(topic);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user