Settings location in Reason to allow certain HTML characters

6 views
Skip to first unread message

Travis Huinker

unread,
Sep 12, 2017, 11:03:46 AM9/12/17
to Reason Discussion
I would like to be able to use the FontAwesome "i" class in the Loki editor, but it always removes the code.


Loki kills this code when placed in the HTML editor: <i class="fa fa-camera-retro"></i> fa-camera-retro

Is there anyway I can get around this or make it allow the i class? Thanks! 

Matt Ryan

unread,
Sep 12, 2017, 11:14:49 AM9/12/17
to reason-discussion
The setting REASON_DEFAULT_ALLOWED_TAGS in settings/reason_settings.php contains a whitelist of allowed tags. I'd tryy adding it.

That said, Tidy tries to "semantic-ize" the HTML to some extent, so it may convert <i> to <em>. Give it a try and see what happens.

Alternately you could see if it is easy to remap fontawesome to <span>.

Matt

--
You received this message because you are subscribed to the Google Groups "Reason Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reason-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to reason-discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/reason-discussion.
For more options, visit https://groups.google.com/d/optout.

Travis Huinker

unread,
Sep 12, 2017, 11:26:30 AM9/12/17
to Reason Discussion
Hmmm odd because <i> is already in our reason_settings list, but it's still removed.


On Tuesday, September 12, 2017 at 10:14:49 AM UTC-5, Matt Ryan wrote:
The setting REASON_DEFAULT_ALLOWED_TAGS in settings/reason_settings.php contains a whitelist of allowed tags. I'd tryy adding it.

That said, Tidy tries to "semantic-ize" the HTML to some extent, so it may convert <i> to <em>. Give it a try and see what happens.

Alternately you could see if it is easy to remap fontawesome to <span>.

Matt
On Tue, Sep 12, 2017 at 10:03 AM, Travis Huinker <huin...@luther.edu> wrote:
I would like to be able to use the FontAwesome "i" class in the Loki editor, but it always removes the code.


Loki kills this code when placed in the HTML editor: <i class="fa fa-camera-retro"></i> fa-camera-retro

Is there anyway I can get around this or make it allow the i class? Thanks! 

--
You received this message because you are subscribed to the Google Groups "Reason Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reason-discuss...@googlegroups.com.
To post to this group, send email to reason-d...@googlegroups.com.

Travis Huinker

unread,
Sep 12, 2017, 4:24:31 PM9/12/17
to Reason Discussion
Is there anyway in Reason to force Loki's auto-HTML clean-up stuff to be disabled for admin users? Loki continually destroys my code after saving.

Matt Ryan

unread,
Sep 12, 2017, 6:36:00 PM9/12/17
to reason-d...@googlegroups.com
Try editing the raw HTML in Chrome. If the <i> tags aren't stripped out then the culprit is Loki. If they are still stripped out the culprit is probably Tidy.

It's not easy to have different cleanup routines for admins vs. other folks because stuff would get stripped out the next time the entity is edited by non-admin.

Matt
Reply all
Reply to author
Forward
0 new messages