A
A
Alexander2015-10-14 21:35:01
PHP
Alexander, 2015-10-14 21:35:01

How to check tag attribute for word content in Jevix?

Hello. There is a site on one well-known CMS and users add content by designing pages through various visual editors. This CMS has a "typographer" component ( https://github.com/ur001/Jevix# ), its functions are called during text processing (forbidden tags are cut off, etc.). A question for those who may have often worked with this thing: is it possible, for example, to check the src attribute of the img tag for the presence of a phrase / word? I know that you can check equality directly, but is it possible to somehow add a tag processing rule with your regular expression? (Like: if the attribute starts with the phrase /upload/ , then everything is fine, otherwise we cut off the tag so that, for example, we can’t insert a CSRF link into the pictures, but only links to images uploaded to the server).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2015-10-14
@donkarabon

Can. You need to check somewhere here:
https://github.com/ur001/Jevix/blob/master/jevix.c...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question