diff --git a/blocks/api/serializer.js b/blocks/api/serializer.js index a29c1fedaa46af..280f9dfcb49464 100644 --- a/blocks/api/serializer.js +++ b/blocks/api/serializer.js @@ -59,7 +59,7 @@ export function getCommentAttributes( realAttributes, expectedAttributes ) { return memo; } - return memo + `${ key }:${ value } `; + return memo + `${ key }="${ value }" `; }, '' ); } diff --git a/blocks/api/test/serializer.js b/blocks/api/test/serializer.js index d639d320428116..59a71ca0f5199e 100644 --- a/blocks/api/test/serializer.js +++ b/blocks/api/test/serializer.js @@ -71,7 +71,7 @@ describe( 'block serializer', () => { fruit: 'bananas' } ); - expect( attributes ).to.equal( 'category:food ripeness:ripe ' ); + expect( attributes ).to.equal( 'category="food" ripeness="ripe" ' ); } ); it( 'should not append an undefined attribute value', () => { @@ -83,7 +83,7 @@ describe( 'block serializer', () => { fruit: 'bananas' } ); - expect( attributes ).to.equal( 'category:food ' ); + expect( attributes ).to.equal( 'category="food" ' ); } ); } ); @@ -109,7 +109,7 @@ describe( 'block serializer', () => { } } ]; - const expectedPostContent = '\n

Ribs & Chicken

\n\n\n'; + const expectedPostContent = '\n

Ribs & Chicken

\n\n\n'; expect( serialize( blockList ) ).to.eql( expectedPostContent ); } );