Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Letters to the COW Team Special characters in scripts and expressions

  • Special characters in scripts and expressions

  • Filip Vandueren

    March 16, 2007 at 8:01 pm

    Hi there,

    a technical question,

    check out this thread:
    https://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=227&postid=7182

    It contains an expression that uses greater than and lesser than symbols, which would break the HTML in the page.

    I can circumvent the problem by using the html code starting with the ampersant < >

    That would look good on the site, but is unreadable in the e-mails, and can’t be copy-pasted from the e-mail.
    Also, not everyone who’d like to share an expression would know or think about the < problem…

    Is there a technical way to filter these problems out automatically ?

    Also I’d like to use the PRE tag so I can show the indenting in my expressions, but that adds an extra 2nd linebreak after each line.

    Anyways, I hope this won’t cause too many headaches,
    and also thanks again for welcoming me to the cow leadership team

  • Eric Bliss

    March 27, 2007 at 4:26 pm

    Hello Filip.

    Unfortunately, this is somewhat problematic. The cow mechanism is a mechanism, not an AI. It doesn’t really know how to decide if somebody wants a particular angle bracket to be a mathematical symbol or part of an HTML tag. Imagine that somebody is writing out a reply, and while they’re talking, they want to emphasize something. But then they want to say that ( 5 < span ) and a little bit later that ( 7 > height ). Now, I’ve written things properly here. But if they didn’t use the encoded form of “less than” and “greater than” inside the parenthesis, it would look like ” span ) and a little bit later that ( 7 ” was intended to be some kind of HTML code. Of course, a human would know that this isn’t what is intended, but a script doesn’t know that, and it’s made worse, since “span” is a valid HTML tag, that can have a lot of stuff in it.

    This isn’t to say that it would be IMPOSSIBLE to fix, just that it’s not a simple fix. And for a complex fix, the question has to be asked “Is the time spent on this worth it, or are there more pressing things to work on?” Unfortunately, this kind of function just isn’t in the near future.

    Eric Bliss

    systems design and integration
    CreativeCow.Net

    int main(void) {
    printf(“Hello World!\n”);
    }

  • Filip Vandueren

    April 15, 2007 at 2:52 pm

    Hi Eric,

    I’m coming back (again) to the problem of lesser than / open html tag characters in javascript snippets.
    I was researching CMS’s and found the following module for Drupal:

    https://drupal.org/project/codefilter
    This is a simple filter module. It handles code and php tags so that users can post code without having to worry about escaping with < and >

    I see you’re using drupal for the blogsection, so I thought I’d point you there.

    Dan Ebberts & I are allready in the habit of using CODE-tags so you might be able to lift the subroutines. Perhaps we could put a sticky in the expressions forum on how to post code ?

    I’ll shut up about it now 😉

    Filip

Viewing 1 - 3 of 3 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy