Announcement

Collapse
No announcement yet.

Buggette. V8 interprets anything in square brackets as a Variable.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Buggette. V8 interprets anything in square brackets as a Variable.

    There's a buggette in V8 whereby anything alphabetic within square brackets in the Product Description field e.g. [RRP] is interpreted by actinic as <actinic:variable name="RRP" />

    This is primarily used whereby [LINK] in the Product Details is replaced by the contents of the Information Link Field variable.

    Try putting [ProductReference] into a Product Description and see what happens!

    It's not just valid Variable names - Actinic seems to interpret anything within square brackets as a potential Variable.

    So a bit of JavaScript like

    !!<
    <script type="text/javascript">
    var x = 1;
    var a = new Array();
    a[x] = 123;
    </script>
    >!!

    Has the line a[x] = 123; expanded as

    a<actinic:variable name="x"> = 123;

    which aint valid JavaScript anymore.

    The fudge that seems to get around this is

    a[ x ] = 123;

    where those spaces inside the [ ] seem to be enough to prevent Actinic doing it's unwanted replacement.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    have you tried putting a \ infront of the [ to become \[Product reference\[
    haven't played but I encountered a similar thing with the ability to force certaint characters through as pure javascript - a bit like if [IE]

    its not a solution, but it could be a work-around

    Comment


      #3
      using \[ doesn't help (unless we're in a JavaScript quoted string constant), but \] does (but would display as \] which we probably don't want).

      The workaround is to use spaces or underscores within the brackets or within the internal text. [RRP] gets expanded but [ RRP ] and [R R P] doesn't. So if writing JavaScript a variable i_x would always work e.g. a[i_x] = 123;

      Still very weird behaviour.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        the thought was a good one. - I'll remember the temp solution instead.

        Comment


          #5
          OK Norman

          Thanks for the report. I have passed this on to the development team.

          Comment

          Working...
          X