Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MartinK 3 posts 43 karma points
    Jun 24, 2020 @ 11:02
    MartinK
    0

    Characters being stripped in HTML / Razor

    Hi. I'm trying to develop a site using Umbraco + MVC / Razor + TailwindCSS

    I've run into this weird problem where '/' is being stripped from the HTML - SOMETIMES..

    After consulting other professionals on ASP.NET Forum / MVC who tested and verified that its NOT MVC stripping the chars, im lead to believe that it's Umbraco !

    in TailwindCSS a classname can be: "w-1/3" (Width of one 3rd)

    The output is occationally missing the '/' char , breaking the HTML / design.

    is there a setting somewhere i need to set to get rid of this problem ?

    like i said, it seems inconsistant .. sometimes the '/' is stripped, sometimes it is not..

    note: I've also tried disabling Javascript which didn't help.

    thanks !

  • Søren Kottal 530 posts 3521 karma points MVP 2x c-trib
    Jun 24, 2020 @ 11:16
    Søren Kottal
    0

    I haven't seen this behavior before. How are your views looking?

  • MartinK 3 posts 43 karma points
    Jun 24, 2020 @ 11:19
    MartinK
    0

    Like normal views ? 😅

    what in particular would you like to know ?

  • Søren Kottal 530 posts 3521 karma points MVP 2x c-trib
    Jun 24, 2020 @ 12:49
    Søren Kottal
    0

    Show me some code :) I use Tailwind too, and have never had these problems. Besides, Umbraco doesn't touch your markup at all. So it must be something else.

  • MartinK 3 posts 43 karma points
    Jun 29, 2020 @ 12:30
    MartinK
    100

    hi ..

    I've given up on finding the code that strips slashes ...

    instead i extended TailwindCSS with fractions of 12 for declaring Width..

    eg:

    • w-4f = 4/12
    • w-5f = 5/12
    • etc

    this is nicer and easier and doesn't contain invalid / bad practice chars in classnames.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies