what if I'm a lazy programmer? Most of my teachers complained 'cause my code was confusing... so obfuscated can count as gpl.
RJC no es un programador perezoso! RJC parecer, s muy brillante y para que Él está en mi equipo de Elgg, .. Bravo Amigo
El Maestro ha dicho!
=)
muchas gracias!
jeje, asi es el maestro ha dicho...
Ok, I tested it in a sandbox installation and it's definitely the htmlawed plugin that's stripping the font-family span. When that plugin is disabled (and I can't disabled it on the live site since it's extremely insecure to do so) font-family is saved. When it is enabled, font-family is stripped.
Now that I've identified the problem, can anyone familiar with htmlawed point me in the direction of where to look in the source to fix it?
EDIT: Hah, ok, that was easy. I just needed to add "font-family" to $allowed_styles in start.php for htmlawed.
EDIT 2: Actually, although this doesn't affect the font-family style that tinyMCE uses, it turns out there is a bug in the main htmLawed.php processing file where "face=arial" is transformed to "font-family: rial" (it drops the first character of the font name). That code section is very archaic to me and I can't figure it out. Lines 627-628:
if(preg_match('`face\s*=\s*(\'|")([^=]+?)\\1`i', $a, $m) or preg_match('`face\s*=\s*([^"])(\S+)`i', $a, $m)){ $a2 .= ' font-family: '. str_replace('"', '\'', trim($m[2])). ';';
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.