[opencms-dev] Avoid html tags in OpenCmsString type

Jonathan Woods jonathan.woods at scintillance.com
Thu May 24 16:37:33 CEST 2007


Andre -

Isn't it more a question of how you _use_ the contents of XML elements
defined as OpenCmsString?

I can see your problem if you just render the contents as they stand; but if
you can work out a way to get the contents programmatically and (e.g.) strip
out unwanted Strings, then your problem will go away.

Jon

-----Original Message-----
From: Andre Zwanziger [mailto:andre.zwanziger at iti.cs.uni-magdeburg.de] 
Sent: 24 May 2007 15:05
To: opencms-dev at opencms.org
Subject: [opencms-dev] Avoid html tags in OpenCmsString type

Hi,

my name is André Zwanziger and I am working at the Business Informatics
Group at the university of Magdeburg. The websites of my working group are
running on OpenCms successfully and we are very satisfied with the content
management system. For our websites, we implemented different content types
for our needs and used the OpenCmsString data type in the content definition
(xsd).

The problem is, that an author may write </body></html> in the OpenCmsString
field, which destroys the whole design/layout of our html pages. Therefore
we created a validation rule in the xsd with the regular expression ^[^<>]*$
which permits all characters but angle brackets. But this solution  is not
satisfying yet, because we force the authors to write html entities instead
of the angle brackets. So my question in general is, how can we avoid html
tags in OpenCmsString fields with OpenCms?

Thanks for your comments in advance,

A. 20ER!

--
Dipl.-Wirtsch.-Inform. André Zwanziger
Very Large Business Applications Lab
phone: +49 (391) 67 19 36 1
http://www.wi-md.de/ http://www.vlba-lab.de/


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev






More information about the opencms-dev mailing list