Hi Christoph, Thanks a lot for replying back. Its a good idea to filter/escape all suspicious characters, i will follow your suggestion. Anyhow i am going to vote for the bugs related to it. Thanks, With Regards, Ravi
On 9/19/05, Christoph Reck <[EMAIL PROTECTED]> wrote: > > Hi Ravikanth, > > there is no such list of unallowed characthers in a string. Only the > velocity syntax exists. Therefore up to Velocity 1.4, a string may not > contain the quote character itself and a new-line character. > Additionally you need care with the other symbols: \ $ # > which have a meaning to velocity during string interpolation - plus > some minor bugs (see below or look at http://issues.apache.org/jira ). > > With the 1.5 version coming up (nightly snapshot), to my knowledge, > you will be able to have multi-line strings, quotes witin quoted > strings (by doubling the quote character! - like in excel CSV exports). > > In your use-case you might need a filter (like a simple reg-ex > replacing) to filter out things that make problems in velocity before > you forward things to your render recursion, example: > #set( $str = $theValue.replaceall("##\)", "$H$H)") ) > $render.recurse( $ctx, '\#set($$nameObj = "$str")' ) > Maybe replace all #s altogehter , if you are not using macros or > directives in your recursion evaluation. > > If you provide patches or vote on the below stated issues, there are > chances that the 1.5 final will not choke on the ## within a string. > (Please be aware that Apache Jakarta projects are done on a free will > basis and contributions are welcome. People who have an itch are > kindly asked to help on solutions.) > > Cheers, > Christoph > > >
