Keep Studio business branding in verified client storage
This commit is contained in:
@@ -4,7 +4,15 @@ const fs = require('node:fs');
|
||||
const vm = require('node:vm');
|
||||
const path = require('node:path');
|
||||
const workspaceModule = fs.existsSync(path.join(__dirname, '../workspace.js')) ? '../workspace.js' : '../public/workspace.js';
|
||||
const { scopedStorage, escapeText } = require(workspaceModule);
|
||||
const { scopedStorage, escapeText, whatsappUrl } = require(workspaceModule);
|
||||
|
||||
test('WhatsApp links preserve explicit international country codes without a Bangladesh prefix', () => {
|
||||
assert.equal(whatsappUrl('+880 1712-426871'), 'https://wa.me/8801712426871');
|
||||
assert.equal(whatsappUrl('+44 20 7946 0958'), 'https://wa.me/442079460958');
|
||||
assert.equal(whatsappUrl('01712426871'), '');
|
||||
assert.equal(whatsappUrl(''), '');
|
||||
assert.equal(whatsappUrl('javascript:alert(1)'), '');
|
||||
});
|
||||
const a = '11111111-1111-4111-8111-111111111111';
|
||||
const b = '22222222-2222-4222-8222-222222222222';
|
||||
function memory() {
|
||||
|
||||
Reference in New Issue
Block a user