Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

trying to split eMdash (long dash) but DTM converts my dash to short dash

edwardb44196902
Level 2
Level 2

var dates = document.querySelector('#txDates').textContent.split(' — ');

 

trying to split the long dash that I have on my content page but whenever i save the rule in DTM, it converts the long dash to short dash. I can't use &eMdash; because it displays like the following:

 

<span>Monday, Mar 16, 2020</span> — <span>Wednesday, Mar 18, 2020</span>

 

any help is greatly appreciated.

1 Reply
salimj
Level 3
Level 3

Perhaps try using the HTML entity code for the EM Dash

 

&#8212;