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?

Comments

  • edited 7:44PM
    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 7:44PM
    yes - too many brackets
  • edited 7:44PM
    I've posted a fix in the develop branch that you can pull from:
    https://github.com/daylightstudio/FUEL-CMS/commit/f501fc90b69b098fe033468441f9420d8209a145
  • 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.