How to use the @webex/helper-html.escapeSync function in @webex/helper-html

To help you get started, we’ve selected a few @webex/helper-html examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webex / react-widgets / packages / node_modules / @ciscospark / redux-module-activity / src / helpers.js View on Github external
return "'";
          case '"':
            return '"';
          default:
            return char;
        }
      });
      // After converting back, if nothing changed, we have pure plain text
      // Unless the markdown html has tags (like when sending a raw link)
      if (plainText === origContent && !content.match(htmlRegex)) {
        hasContent = false;
      }
    }
    if (!hasContent && content.match(htmlRegex)) {
      // If it has raw html but no markdown, we need to escape
      content = escapeSync(cleanedString);
      hasContent = true;
    }

    const {mentions, mentionsPlainText, mentionsText} = getMentions(content, plainText);

    if (mentions && mentions.length) {
      hasContent = true;
      messageObject.mentions = {
        items: mentions
      };
      content = mentionsText;
      plainText = mentionsPlainText;
    }


    // If we had to modify the original content, send converted

@webex/helper-html

HTML Utiltities

MIT
Latest version published 29 days ago

Package Health Score

87 / 100
Full package analysis

Similar packages