1

When creating HTML content blocks, Content Builder is manipulating the code by duplicating and converting some characters to the HTML equivalent (i.e. "<" goes to &gt;) - seems to only happen when AMPscript is involved.

For example - this is code that I'm pasting in:

%%[
/*
Update variable with the product IDs you'd like to promote
*/
SET @product_ids = '20000885, 20000886'
SET @prod_rowset = BUILDROWSETFROMSTRING(@product_ids, ",")
IF RowCount(@prod_rowset) >= 1 THEN
    FOR @i = 1 TO 1 DO
        ContentBlockByID("81195")
]%%
<table width="100%" class="mobilepadded" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;border-spacing:0px">
    <tr>
        <td>“This is sample copy.”</td>
    </tr>
</table>
%%[Next @i ENDIF]%%

And this is what Content Builder changes it to:

%%[
/*
Update variable with the product IDs you'd like to promote
*/
SET @product_ids = '20000885, 20000886'
SET @prod_rowset = BUILDROWSETFROMSTRING(@product_ids, ",")
IF RowCount(@prod_rowset) >= 1 THEN
    FOR @i = 1 TO 1 DO
        ContentBlockByID("81195")
]%%
<table width="100%" class="mobilepadded" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;border-spacing:0px">
    <tr>
     <td>“This is sample copy.”</td>
    </tr>
</table>
%%[Next @i ENDIF]%%
                               %%[
/*
Update variable with the product IDs you'd like to promote
*/
SET @product_ids = '20000885, 20000886'
SET @prod_rowset = BUILDROWSETFROMSTRING(@product_ids, ",")
IF RowCount(@prod_rowset) &gt;= 1 THEN
    FOR @i = 1 TO 1 DO
        ContentBlockByID("81195")
]%%
<table width="100%" class="mobilepadded" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;border-spacing:0px">
    <tr>
     <td>“This is sample copy.”</td>
    </tr>
</table>
%%[Next @i ENDIF]%%
  • Hmm...the issue seems to go away when I remove the apostrophe in the first comment - the word "you'd." – Daniel Jan 30 '18 at 5:27
  • We have also seen this with our code. We use an HTML block full of only ampscript to setup coupon information, and it's being reinterpreted the same way, it creates a duplicate of the entire coupon code, and also breaks the function as the > symbol no longer works as an operator. As I mentioned in my other post, we're switching away from content builder to HTML paste because of this issue. – Kevin Illick Jan 31 '18 at 12:47
  • Thanks for the extra information @Kevin. Are you switching to HTML paste in Classic Content? Not sure which stack you're on if classic content is even an option for you. – Daniel Feb 1 '18 at 15:52
  • Classic is an option for us, but since that's being sunsetted next year we're doing HTML paste in content builder. None of the drag and drop features or code modifications exist in the HTML paste section though, so it's just you and your code. – Kevin Illick Feb 2 '18 at 12:45
1

Unfortunately, this is a bug that was introduced with Friday's release. We're currently coding a fix that will be in next Wednesday's maintenance release.

  • Thank you @Don - will this also fix the issue outlined in Kevin's comment above and more elaborately here? salesforce.stackexchange.com/questions/186213/… – Daniel Feb 1 '18 at 15:46
  • Just to clarify one thing @Daniel. You're seeing this happen in an HTML block? Also, when does the duplication occur - when you save the block? When you send the email? – Don Owens Feb 1 '18 at 19:30
  • The duplication occurs within the HTML block, in the preview pane and when the email is sent. The duplication occurs immediately in the preview pane but only shows up in the HTML when I navigate away from the HTML pane then navigate back to it. – Daniel Feb 2 '18 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.