We're transitioning all our old email code from the Classic Content into the Content Builder, but I've run into an issue several times that looks like a glitch in the HTML editor (NOT the wysiwyg) to me when writing AmpScript. When using the 'less than' operator
< in a comparison, the html editor is interpreting that as an HTML tag opening like you'd see in
<table>. as a result when I save my HTML block the editor goes through and edits my code assuming that I've screwed up an HTML tag and keeps my intended ampscript from functioning.
My code is this:
elseif ROWCOUNT(@rs_email) < 1 then
I'm checking whether a data extension has results for my intended audience. My workaround currently is switching the order of the comparison, since the "greater than" operator isn't misinterpreted.
elseif 1 > ROWCOUNT(@rs_email) then
It's annoying and I'm wondering if this is a known issue for anyone else, or if I'm doing something wrong.
The code highlighting is indicating that it's trying to read this portion as HTML. It's in an HTML block, but that's how we've always done our AmpScript before, not sure why it would change in Content Builder.