diff --git a/src/__tests__/autocapture.test.ts b/src/__tests__/autocapture.test.ts index d9ddbc80c..23ab88c01 100644 --- a/src/__tests__/autocapture.test.ts +++ b/src/__tests__/autocapture.test.ts @@ -1123,7 +1123,7 @@ describe('Autocapture system', () => { const props1 = getCapturedProps(newLib.capture) expect(props1['$elements_chain']).toBe( - 'a.test-class,test-class2,test-class3,test-class4,test-class5:nth-child="1"nth-of-type="1"href="http://test.com"attr__href="http://test.com"attr__class="test-class,test-class2,test-class3,test-class4,test-class5";span:nth-child="1"nth-of-type="1"' + 'a.test-class.test-class2.test-class3.test-class4.test-class5:nth-child="1"nth-of-type="1"href="http://test.com"attr__href="http://test.com"attr__class="test-class test-class2 test-class3 test-class4 test-class5";span:nth-child="1"nth-of-type="1"' ) }) }) diff --git a/src/autocapture.ts b/src/autocapture.ts index 255566034..ddb2dab68 100644 --- a/src/autocapture.ts +++ b/src/autocapture.ts @@ -110,7 +110,7 @@ const autocapture = { // html attributes can _technically_ contain linebreaks, // but we're very intolerant of them in the class string, // so we strip them. - value = splitClassString(value).join() + value = splitClassString(value).join(' ') } props['attr__' + attr.name] = limitText(1024, value) }