filename parsing and assets

edited June 2014 in Share
Hi again,

a client seems to have difficulty in not uploading images with parentheses in the file name via the WYSIWYG image button (CKE). Eg "my_image(5).jpg". Of course, this is OK for a file name, but not for parsing via php, where extraneous brackets break the parsing and the front-end page ( the field in question is in a module and is being rendered via parse_template_syntax() ).

Is it possible to either prevent uploads with parentheses, or re-write the file name on the fly when using the asset upload modals?


  • edited 3:16AM
    I'm seeing an issue where when you view source in markitUp! mode that it adds extra brackets and parenthesis like so::
    <img alt="" src="{img_path({img_path('test(300).jpg')})}" />
    Is that what you are seeing?
  • edited 3:16AM
    yes - too many brackets
  • edited 3:16AM
    I've posted a fix in the develop branch that you can pull from:
  • edited June 2014
    Sorry, not so good. The last letter of the filename extension is being chopped in the editor. Even if the code is edited via Markitup, it is magically truncated again. Eg:

    <p><img alt="" src="{img_path(_uploads/test(300).jp)}" /></p>

    If saved in the database, with the full extension, the parse_template_syntax() is still having trouble eg:
    Compilation error at line 1 in "string:" : Parse error in ".jpg)}" />
Sign In or Register to comment.