simple-image-tutorial icon indicating copy to clipboard operation
simple-image-tutorial copied to clipboard

I followed the 'sanitized saved data' section of the tutorial but it is not functioning

Open ghost opened this issue 4 years ago • 1 comments

I followed every step of the guide and all seemed ok but when it came to sanitizing saved data (page here) the data in the caption section would not get sanitized.

I tried both methods (manual and automatic) but any time I typed Here is <div> a </div> <i>caption</i> field the saved output would not be sanitized => "caption": "Here is <div> a </div> <i>caption</i> field"

I thought I have done something wrong and to check I ran the code of (the simple-image-tutorial) in this GitHub page but even in this code the caption does not get sanitized.

I doubt I have missed anything but please, let me know if I have.

Thank you for your work and this great step-by-step guide. It definitely makes development easier

ghost avatar Nov 11 '21 06:11 ghost

@ghost, when editing html with the browser's DevTools, use the Edit as HTML item, not Edit as Text.

For example, I added two divs, the first through the item Edit as Text, the second through the item Edit as HTML :

01

Source code in DevTools:

02

03

Result, html tag sanitized:

04

reregaga avatar Jan 22 '23 13:01 reregaga