• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Escape characters of primefaces editor to do a query on sparql

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there, How do I escape the characteres of a primefaces editor?
I have this in form in a xhtml page

<p:editor value="#{managebeanX.valor}" />

but when I try to save this value through a sparql query it says:
virtuoso.jdbc4.VirtuosoException: SQ074: Line 2: SP030: SPARQL compiler, line 2: syntax error at 'Apple' before '-'

Here is the sparql query
INSERT INTO GRAPH <http://localhost:8890/Asst>; {

<http://www.dominio.edu#Q1>; rdf:type asst:Question; asst:prompt "adada <span class="Apple-tab-span" style="white-space:pre"> </span>"^^xsd:string. }

The Blue text is the value of the p:editor. It' has html characters... So I think I need to scape those characters... but how?

Thanks in advance!
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try adding escape="false" to p:editor. FYI this escape flag is true by default.
 
Dave Alexander
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
p:editor doesn't have the escape attribute, just <h:outputText escape="false" > does..
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If primefaces can't escape it for you then you may need to do it before display it.

Is it possible to make such tags surround by <![CDATA[....]]>

Is there a program that parse/dissect the xml file into the schema/DTD elements?
 
Dave Alexander
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know.. but I escape that string with a java function replaceAll()... it works..
 
reply
    Bookmark Topic Watch Topic
  • New Topic