Help

0

local imprt 'fa.less' is forbidden for security reasons.

Avatar
陈伟

When I try to integrate a zTree widget into odoo CE10.0, I got this error.

With this error messsage, the font-awesome font can not be loaded and display blank in my page.

I digged into the source code and found the line report such error:

def sanitize(matchobj):
ref = matchobj.group(2)
line = '@import "%s"%s' % (ref, matchobj.group(3))
if '.' not in ref and line not in imports and not ref.startswith(('.', '/', '~')):
imports.append(line)
return line
msg = "Local import '%s' is forbidden for security reasons." % ref
_logger.warning(msg)
self.css_errors.append(msg)
return ''

The error case is a dot character is found in the less file name 'fa.less' and then the exception was raised.

I can not understand why the dot character in file name should be forbidden and even I comment this line out it is still can not work.

Avatar
Discard