Home/Support/Support Forum/PBuilder: how do I escape keywords?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

PBuilder: how do I escape keywords?

0 votes
I am trying to compile the JQuery framework into my project. One of the things that happens is that I get compile errors. It appears that PBuilder is choking specific keywords that actually appear in the javascript code of the Jquery library.

Is there a list of these words and an easy way to escape them in javascript source code?

The error I get is

Code:
Description Resource Path Location Type expected "=true", "=false", or nothing to follow keyword "MULTIPLE=MULTIPLE" in <select > tag jquery-1.5.1.js HTTP CGI Project Template/web/webcontents/html/js/libs 5012 PBuilder Problem Marker

The offending line of javascript looks like this:
Code:
option: [ 1, "<select multiple='multiple'>", "</select>" ],

Any thoughts on work around? I can't really change the javascript. I assuming there is an escape sequence that will make the compiler happy.
asked Aug 10, 2011 in NET+OS by gpotter New to the Community (2 points)

Please log in or register to answer this question.

2 Answers

+1 vote
My answer is a little late relative to the original question and answer but I'd like to clarify the answer from kubiajir. kubiajir is about 80% correct. There is another 20% that will clean up the answer.

kubiajir suggested surrounding javascript used within an advanced web server (NET+OS development kit) based application with the following pbuilder comment tag pair:

<!-- RpDZT -->
<!-- RpEnd -->

(DZT being fort for DataZeroTerminated)

The intent is to tell the pbuilder utility to not modify HTML tags with pbuilder macros. The issue is that when the advanced web server goes to expand the macros, in some cases, a comment tag such as <HTML> or </FORM> might be replaced with (after expansion) with <HTML>\n or </FORM>\n.

Why is this an issue?
We have seen instances where, within a javascript script, the javascript wants to create a new HTML page for display through the browser. It will do this by using the document's writeln method. The script will use a writeln method containing HTML tags. The problem is that pbuild will replace the HTML tags in the writeln with the macro. When expanded again, if a newline (\n) was added, this will break the writeln method into two or three lines which the javascript interpreter within browsers is not happy about.

So how does one get around this or what is the missing 20%?

Add the RpParse attribute with a value of 0 to the RpDZT comment tag. Thus your comment tag pair surrounding the javascript code would look like the following:


<!-- RpDZT RpParse=0 -->
my javascript code goes here
<!-- Rpend -->

The RpParse attribute with a value of 0 tell pbuilder "Keep your hands off my javascript".
answered Jan 17, 2014 by dakotas_dad Veteran of the Digi Community (694 points)
0 votes
Hi,
add <!-- RpDZT --> at begin of file and <!-- RpEnd --> to the end of file. Also be aware of words defined in RpUsrDct.txt! Anything defined in RpUsrDct.txt makes me mess in web pages.
answered Sep 5, 2011 by kubiajir Community Contributor (61 points)
...