laravel-shortcodes icon indicating copy to clipboard operation
laravel-shortcodes copied to clipboard

attribute having space value converts to weird array.

Open hardikdangar opened this issue 4 years ago • 1 comments

I.e. [pdfmodal path=/files/docs_5eebb3f1b4e595.53497870.pdf modaltitle='Flat Rate Cost']Click Here[/pdfmodal]

see the argument modaltitle it becomes weird object...

Returns

Shortcode {#1455 ▼
  #name: "pdfmodal"
  #attributes: array:4 [▼
    "path" => "/files/docs_5eebb3f1b4e595.53497870.pdf"
    "modaltitle" => "'Flat"
    0 => "Rate"
    1 => "Cost'"
  ]
  +content: "Click Here"
}

How to prevent that? how to allow spaces in attribute values.

hardikdangar avatar Jun 22 '20 14:06 hardikdangar

It should work, I think you have forgot to contain path in quotes, that's why it is affecting next attribute.

[pdfmodal path="/files/docs_5eebb3f1b4e595.53497870.pdf" modaltitle="Flat Rate Cost"]Click Here[/pdfmodal]

Can you try this?

webwizo avatar Jun 22 '20 16:06 webwizo