mirror of
https://github.com/reality/dbot.git
synced 2024-12-02 17:09:29 +01:00
52cdddf3f7
The Jade templating code in `views/quotes.jade` will now check against the Regular Expression which has been added to `snippets.js` and is delivered to the template by `modules/web.js`. The reguar expression used should be able to handle any URL and ensure no non-URL elements are made into URLs. It may be worth adding checking for 4XX error codes at a later date. This shouldn't affect any of the other modules; features have only been added, not modified.
8 lines
187 B
Plaintext
8 lines
187 B
Plaintext
div#quotelist
|
|
-each quote in quotes
|
|
-if(quote.match(locals.url_regex))
|
|
div.quote
|
|
a(href=quote)=quote
|
|
-else
|
|
div.quote #{quote}
|