Skip to content

Bug in TemplateBase.ResolveUrl() ? #37

@oliverlexis

Description

@oliverlexis

Hi, I really like your RazorMachine, I just switched from RazorEngine to RazorMachine, because it is much easier to use.

But, maybe there is a small bug in TemplateBase.ResolveUrl(). When in source file you write something like: a href="/folder/@Model.SomeString", the part before the @ is passed correctly to ResolveUrl with parameter path = "/folder/". But because the VirtualPath is normalized, the trailing slash is removed. After adding the string variable from the model, it Ends up like that:
a href="/approot/folderTheString" the slash in between is missing the the link doesn't work.
Can you add functionality to ResolveUrl to check whether to add an trailing slash after call of .Normalize()?

Thanks, Oliver.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions