From a user report, ‘when editing foo. textboxBar allows special characters which produce a warning .net error on save ‘
textboxBar.Text is assign to an object and saved using nHibernate
<property name="TextboxBar" length="255" not-null="false" />
Thinking it may be nHibernate not escaping strings but can’t find it in the docs.
Does nHibernate 1.2.0 automatically escape strings, link appreciated?
I doubt that it even needs to escape strings – I’d expect values to be passed in parameterised statements.
I strongly suspect this has nothing to do with nHibernate – I suspect this is just an ASP.NET error, although admittedly that’s assuming that it’s an ASP.NET application. If this is the case, you probably just want to turn off validation for that page.
See the ASP.NET FAQ page on validation for more details.