Results 1 to 3 of 3

Thread: Invalid ids are allowed in minified code

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2017
    Posts
    3

    Default Invalid ids are allowed in minified code

    According to the documentation for the id field of viewport, punctuation shouldn't be allowed:
    http://docs.sencha.com/extjs/5.1.3/a...rt.html#cfg-id

    When I use "test.test" as an id, ext-all-debug correctly throws an error, however ext-all does not. I have looked in the minified code and it is missing the regex check.

    On line 40078 in ext-all-debug, this is the check:
    if (!me.validIdRe.test(me.id)) { Ext.Error.raise('Invalid component "id": "' + me.id + '"');
    }

    This code seems to be absent from the minified file

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report. Can you please post a test case which reproduces this issue when run with ext-all.js?

  3. #3
    Sencha User
    Join Date
    Jun 2017
    Posts
    3

    Default

    https://fiddle.sencha.com/#view/editor&fiddle/21jj

    Ext.application({
    name : 'Fiddle',


    launch : function() {
    Ext.create("Ext.container.Viewport", {
    id: "test.test"
    });
    }
    });

    This correctly throws an error in the fiddle, because the fiddle uses ext-all-debug. You need to try it locally with ext-all.js to see that it allows it in spite of an invalid id.

Similar Threads

  1. How to use minified code instead of ext-all-debug?
    By psomers in forum Sencha Fiddle
    Replies: 1
    Last Post: 14 Jun 2017, 8:39 AM
  2. Native app with non-minified app code
    By kostysh in forum Sencha Touch 2.x: Discussion
    Replies: 3
    Last Post: 7 Apr 2013, 7:02 AM
  3. Replies: 5
    Last Post: 21 Dec 2012, 6:27 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •