SarwarAhmed's avatar

SarwarAhmed wrote a comment+100 XP

1mo ago

@Alext1926 What is your GitHub ID?

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

1mo ago

** Warning **

Do not just use ->markdown() on its own this is prome to XSS (Cross-Site-Scripting) if you was to put <img src="#" onmouseover="alert('hacked');" /> in your idea description or worse a user was, when they hover over the image, an alert will show. Instead use:

    `return Attribute::get(
        fn ($value, $attributes) => new HtmlString(str($attributes['description'])->markdown([
            'html_input' => 'escape',
            'allow_unsafe_links' => false,
            'max_nesting_level' => 5,
        ])));`
SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

1mo ago

Thanks @marc_meat! 🙌🏻 After investigating, I confirmed that this is indeed the error. I found a possible workaround without modifying the Composer fork: dynamically setting the enctype with Alpine.js only when the user selects an image:

x-bind:enctype="hasImage ? 'multipart/form-data' : false"

This way, the form is submitted without multipart/form-data by default, and the browser test passes, but when the user selects an image, it changes automatically. I hope this helps!

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

1mo ago

Is anyone else having this problem?

FAILED Tests\Browser\CreateIdeaTest > it creates a new idea
Failed asserting that an array has the key 'title'.

... I've checked everything over and over and I still can't figure out what's wrong!

SarwarAhmed's avatar

SarwarAhmed wrote a comment+100 XP

1mo ago

@Alext1926

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

2mos ago

Here are the full CSS component files for those looking to copy:

resources/css/components/btn.css

resources/css/components/form.css

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

2mos ago

@nosthas

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

3mos ago

@willtomlinson Putting effort into getting the job you want is absurd? What are you talking about?

Do you really want to entertain the possibility that the 15 year old bus boy is putting more time and effort into getting a job than you? He/She has to:

  • 1 hour: Shower, look presentable.
  • 30 minutes: Travel to/from restaurant.
  • 20 minutes: Fill out application.
  • 10 minutes: Wait for manager to call you in.
  • 20 minutes: Interview with manager.

We're already at 2.5 hours. What do you think @willtttomlinson? Should you spend 2.5 hours applying for a six-figure job that you'll be at for potentially years?

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

4mos ago

You can also remove the register routes

You SHOULD also