Skip to content

Directive values are not quote-escaped #3860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
adragus-inviqa opened this issue Mar 22, 2016 · 6 comments
Closed

Directive values are not quote-escaped #3860

adragus-inviqa opened this issue Mar 22, 2016 · 6 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@adragus-inviqa
Copy link
Contributor

This is still the case: http://stackoverflow.com/questions/23925826/magento-widgets-truncate-fields-containing-quotes

I can imagine why this is happening.
The fix is up to you. There are several ways to tackle this.

Steps to reproduce

  1. Search for or create a widget which has a text config/parameter.
  2. Insert that widget into a CMS page/block using the editor, setting the value to There is no "escape"!

Expected result

  1. A directive inserted as {{... my_text_value="There is no "escape"!"}} <-- this looks wrong, ofc, but it's just to show you what I mean.

Actual result

  1. The directive is inserted as {{... my_text_value="There is no "}}
  2. Sigh.
@katmoon katmoon added the CS label Mar 22, 2016
@MomotenkoNatalia MomotenkoNatalia added PS and removed CS labels Mar 25, 2016
@piotrekkaminski
Copy link
Contributor

reproduced. Internal issue MAGETWO-54243

@developer-lindner
Copy link

Does this fix product attributes also?

If i insert an image (in product's description) through the UI in backend i see the "right" media directive syntax, after saving there is just a mess left...

@veloraven
Copy link
Contributor

Closed as has been already fixed in 3ff19bf c2fd296 0859c7d

@Ctucker9233
Copy link

@veloraven @magento-team What version of Magento will this fix be included in?

@sashas777
Copy link
Contributor

@veloraven Also need some kind of escape when value is cms directive.
For example:
{{widget type="Custom\Custom\Block\Widget" background="{{media url="wysiwyg/14.jpg"}}" }}
When you click "Show/Hide Editor" at the cms page with this widget it breaks.

Need something at the: lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js

for decodeDirectives & necodeDirectives functions

hostep pushed a commit to hostep/magento2 that referenced this issue Jul 3, 2017
…o#3860

(cherry picked from commit 3ff19bf)

MAGETWO-54243: [Github] Directive values are not quote-escaped magento#3860

(cherry picked from commit c2fd296)

MAGETWO-54243: [Github] Directive values are not quote-escaped magento#3860

(cherry picked from commit 0859c7d)
@magento-team magento-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels Jul 31, 2017
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-70436

magento-engcom-team pushed a commit that referenced this issue Mar 6, 2019
MAGETWO-98574: Stabilization of copy paste detector test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests