When using CodeMirror in the Koha News tool the editor automatically converts HTML entities which can be problematic. For example: <option value="(itype:DVD and loc:*NEW) AND NOT index-term-genre:"television"">Movies</option> Gets converted to: <option value="(itype:DVD and loc:*NEW) AND NOT index-term-genre:"television"">Movies</option>
Created attachment 116839 [details] [review] Bug 27694: use HTML filtering on News Tool textarea To test: 1. Add some HTML enties to your codemirror in the News Tool. Example: <option value="(itype:DVD and loc:*NEW) AND NOT index-term-genre:"television"">Movies</option> 2. Save and re-eneter the tool, the HTML entites have been converted 3. Apply patch 4. Try again, HTML entities should not be converted
Created attachment 116926 [details] [review] Bug 27694: use HTML filtering on News Tool textarea To test: 1. Add some HTML enties to your codemirror in the News Tool. Example: <option value="(itype:DVD and loc:*NEW) AND NOT index-term-genre:"television"">Movies</option> 2. Save and re-eneter the tool, the HTML entites have been converted 3. Apply patch 4. Try again, HTML entities should not be converted Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
This appears to work, but is it expected that you can't use the source view of the visual editor to enter <option value="(itype:DVD and loc:*NEW) AND NOT index-term-genre:"television"">Movies</option> ? It only leaves "Movies" and that's scary. Does it mean opening in the wrong editor and saving, you'll completely destroy things?
(In reply to Katrin Fischer from comment #3) > This appears to work, but is it expected that you can't use the source view > of the visual editor to enter <option value="(itype:DVD and loc:*NEW) AND > NOT index-term-genre:"television"">Movies</option> ? It only > leaves "Movies" and that's scary. > > Does it mean opening in the wrong editor and saving, you'll completely > destroy things? Ok. it only destroy entries if it doesn't like your HTML. Adding the surrounding select make it stay ok.
Created attachment 116966 [details] [review] Bug 27694: use HTML filtering on News Tool textarea To test: 1. Add some HTML enties to your codemirror in the News Tool. Example: <option value="(itype:DVD and loc:*NEW) AND NOT index-term-genre:"television"">Movies</option> 2. Save and re-eneter the tool, the HTML entites have been converted 3. Apply patch 4. Try again, HTML entities should not be converted Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 21.05, thanks to everybody involved!
when using "Edit with text editor", html is escaped twice : " > &quot; Is this the expected behavior ?