0
Welcome Guest! Login
0 items Join Now

[BugFix] Preset loader converts / to \/

    • evilC's Avatar
    • evilC
    • Jr. Rocketeer
    • Posts: 39
    • Thanks: 0

    [BugFix] Preset loader converts / to \/

    Posted 13 years 6 months ago
    • If you have a text field as part of your saved presets and it contains say a UNIX-like path (eg /folder/myfile.css) then whenever you load this preset, / will be converted to \/

      It is not stored incorrectly, it is merely passed to the preset loader incorrectly. I am not sure where the error lies, but here is a quick fix:

      preset-mt1.2.js

      Around line 345

      FIND:
       
      el.fireEvent('set', value);
       

      ADD A LINE BEFORE:
       
      value = value.replace(/\\\//g, '/');
       
    • evilC's Avatar
    • evilC
    • Jr. Rocketeer
    • Posts: 39
    • Thanks: 0

    Re: [BugFix] Preset loader converts / to \/

    Posted 13 years 6 months ago
    • Hmm, I had a wierd thing going on where it would still happen if the text box was part of a custom widget.

      To fix this, put an extra line before, making it read like so:
                                         value = value.replace(/\\\//g, '/');
                                         el.value=value;
                                         el.fireEvent('set', value);
       

Time to create page: 0.086 seconds