Fix: Backslash not escaped when requiring riot at top of tag #2216

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@OhYea777

Code

  1. Have you added test(s) for your patch? If not, why not?
    Unable to add tests as problem only exists in a Windows environment

  2. Can you provide an example of your patch in use?
    Error pre-fix:

Error: Cannot find module 'C:UsersVengeanceDownloadsDevelopmentJavaScriptNode.  jseden
  ode_modules iot iot'

  - module.js:470 Function.Module._resolveFilename
    module.js:470:15

  - module.js:418 Function.Module._load
    module.js:418:25

  - module.js:498 Module.require
    module.js:498:17

  - module.js:20 require
    internal/module.js:20:19

  - users-admin.tag:2 Object.<anonymous>
    C:/Users/Vengeance/Downloads/Development/JavaScript/Node.js/eden/app/cache/v    iews/users-admin.tag:2:16

  - module.js:571 Module._compile
    module.js:571:32

  - index.js:28 loadAndCompile
    [eden]/[riot]/lib/server/index.js:28:11

Post-fix: No error is present and riot begins to render as normal.

  1. Is this a breaking change?
    For Windows, yes it is, as windows uses '\' for path separation.

Content

Changed './lib/server/index.js' to sanitize backslashes for requiring riot at the top of tag files.

GianlucaGuarini added a commit that referenced this pull request Jan 15, 2017

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Jan 15, 2017

Member

@OhYea777 could you please test my patch? Here in my windows10 everything seems to work fine

Member

GianlucaGuarini commented Jan 15, 2017

@OhYea777 could you please test my patch? Here in my windows10 everything seems to work fine

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Jan 17, 2017

Member

I guess it was fixed with my patch

Member

GianlucaGuarini commented Jan 17, 2017

I guess it was fixed with my patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment