Zifmia - Content Filtering

So I have a working version of Zifmia (web service based FyreVM engine) accessible via jQuery Ajax. There are still pieces to complete, like logins, user identity, authorization, and managing game sessions, but I’m looking at the UI for the moment.

The content from FyreVM is returned in raw format. Nothing is done to the text of any channel from what the I7 game provides. In previous versions of FyreVM, we had a filtering mechanism that would implement XAML, HTML, or plain text results. I didn’t think this belonged in the FyreVM engine, so I removed it.

Now I need to re-implement the content filtering, in the case of Zifmia, for HTML. But where?

My original thoughts were it would just be an add-on library on the backend, but I think an author may want to tweak the filter, so I’m thinking this would be better served on the client side in JavaScript.

So Zifmia.HTMLFilter.js would implement a standard channel filter mechanism. The default filter would simply change newlines to

tags. I still need to work through this, but it’s not complicated.

If an author were to add their own inline tags, those have to be either filtered or ignored. An example of inline filtering might be the author designating a link with something like:

say “The [kitchen is to the east | go east]”;

And the content filter turns that into

The <a href="javascript:AutoRespond(‘go east’)>kitchen is to the east


I’m just looking for anyone’s thoughts on where the content filtering should happen and any other ideas about implementation.

David C.