@chat-adapter/teams 4.20.2 → 4.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5101,12 +5101,17 @@ var TeamsAdapter = class {
5101
5101
  }
5102
5102
  let text = "";
5103
5103
  if (msg.body?.content) {
5104
- let stripped = msg.body.content;
5105
- let prev;
5106
- do {
5107
- prev = stripped;
5108
- stripped = stripped.replace(/<[^>]*>/g, "");
5109
- } while (stripped !== prev);
5104
+ let stripped = "";
5105
+ let inTag = false;
5106
+ for (const ch of msg.body.content) {
5107
+ if (ch === "<") {
5108
+ inTag = true;
5109
+ } else if (ch === ">") {
5110
+ inTag = false;
5111
+ } else if (!inTag) {
5112
+ stripped += ch;
5113
+ }
5114
+ }
5110
5115
  text = stripped.trim();
5111
5116
  }
5112
5117
  if (!text && msg.attachments?.length) {