Skip to content

Commit f31b594

Browse files
authored
Fixed Unescape newlines in twitter package
Fixed twitter client from posting `/n` in it's tweets
1 parent eecaa73 commit f31b594

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/client-twitter/src/post.ts

+1
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ export class TwitterPostClient {
256256
.replace(/^\s*{?\s*"text":\s*"|"\s*}?\s*$/g, '') // Remove JSON-like wrapper
257257
.replace(/^['"](.*)['"]$/g, '$1') // Remove quotes
258258
.replace(/\\"/g, '"') // Unescape quotes
259+
.replace(/\\n/g, '\n') // Unescape newlines
259260
.trim();
260261
}
261262

0 commit comments

Comments
 (0)