# HG changeset patch # User Damien Correia # Date 1530707043 -7200 # Node ID 69cd0ee4546a51daa94130d6e48a09c5c74107b3 # Parent 59452a6f51a894af411dbddaab74503689960f59# Parent e01d3a0db6525e824eb7188192c4db9db07fd8e4 merge default diff -r 59452a6f51a8 -r 69cd0ee4546a src/pyams_utils/text.py --- a/src/pyams_utils/text.py Tue Jul 03 16:36:53 2018 +0200 +++ b/src/pyams_utils/text.py Wed Jul 04 14:24:03 2018 +0200 @@ -23,7 +23,7 @@ from pyramid.interfaces import IRequest # import packages -from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config +from pyams_utils.adapter import ContextRequestAdapter, ContextRequestViewAdapter, adapter_config from pyams_utils.request import check_request from pyams_utils.vocabulary import vocabulary_config from zope.interface import Interface @@ -60,16 +60,12 @@ @adapter_config(name='raw', context=(str, IRequest), provides=IHTMLRenderer) -class BaseHTMLRenderer(object): +class BaseHTMLRenderer(ContextRequestAdapter): """Raw text HTML renderer This renderer renders input text 'as is', mainly for use in a
 tag.
     """
 
-    def __init__(self, context, request):
-        self.context = context
-        self.request = request
-
     def render(self, **kwargs):
         return self.context