[...] Agreed. Class.getResourceAsStream() is the most portable way to do this. Note that you will want to modify the Ant script to make sure that any properties files are correctly added to JSPWiki.jar. [...]
On Apr 14, 2008, at 2:21 PM, Janne Jalkanen wrote: > 1.- check for the profanities list on ServletContext > > > > I'd just simply use the Class.getResourceAsStream(). That would a) allow > you to have multiple instances of the list with different words, and b) it > would also work in the case where there is no ServletContext (e.g. when > someone wants to embed JSPWiki rendering as a part of the application). > > Is there some "equivalent" class to ServletContext (like, i.e. > > WikiSession > > and Session)? Right now, I was planning to grab it from WikiContext -> > > WikiEngine -> ServletContext, but just curious, I haven't found one. Any > > other approach to achieve this functionality? Placing things on > > ServletContext.. urg; but in this case, where else? > > > > You should probably model it according to the Denounce plugin (which reads > a property file using the classloader). That sounds like the easiest > approach. > > /Janne > great, thanks! [...] Question: is profanity something that ought to be localized? [...] 2008/4/14, Janne Jalkanen <[EMAIL PROTECTED]>: > > > On Apr 14, 2008, at 21:25 , Andrew Jaquith wrote: > > Question: is profanity something that ought to be localized? > > > > Guys, I'd hate it if JSPWiki source code suddenly became X-rated. > > Granted, it would probably be the first software ever where you had to be > 18 just to see the source, and I think notoriety is just an another kind of > fame - not better nor worse - but still, something in this is sort of > telling me that we might just want to consider it a bit before starting to > shovel all the wonderful curse words in our various languages into SVN. > > Not that learning Finnish swearing wouldn't be a great cultural trip to > everyone. Our language is very good for profanity. > > ;-) > > (Just having bad dreams. Now go to bed, all of you.) > > /Janne > Well, I'd rather see it as a multi-cultural effort towards... ermm.. whatever. Oh ok, in any case it sounded like funny :O) Now seriously, as filters.xml has to be configured in order to get the filter running, it seems better to get a single, empty file in which profanity should be placed. The online docs & ProfanityFilter's javadoc could point that this single file needs to be completed in order to have an effective filter. So, imagination should be the limit O:-D p.s.: finnish and/or dutch and/or german cursing would make meetings so interesting...
