Add this line to your view:
print( page.portfolioitem.content)
And see the results in the console. You'll see right away if the tags are
already stripped or not. If so, they were stripped upstream prior to
getting saved in the db. Otherwise, if the tags are there, then you can
focus on why the template is stripping them.
On Oct 30, 2014 7:58 PM, "Ross Laird" <[email protected]> wrote:
> But sadly, still no...
>
> On Thursday, 30 October 2014 19:56:21 UTC-7, Ross Laird wrote:
>>
>> Oh, silly, silly. I should try this:
>>
>> {{ page.portfolioitem.content|safe }}
>>
>> On Thursday, 30 October 2014 19:50:48 UTC-7, Ross Laird wrote:
>>>
>>> Thanks for the reply. At least it sounds like there is a way to do this.
>>> However --
>>>
>>> I've tried this:
>>>
>>> {{ page.portfolioitem.content|richtext_filters|safe }}
>>>
>>> and this:
>>>
>>> {{ page.portfolioitem.content|richtext_filters|var|safe }}
>>>
>>> and this:
>>>
>>> {{ page.portfolioitem.content||var|safe }}
>>>
>>> None of these seem to work.
>>>
>>> Am I missing something very simple?
>>>
>>>
>>> On Thursday, 30 October 2014 19:29:19 UTC-7, MattQ wrote:
>>>>
>>>> For me it was Django built-in templating system that was stripping my
>>>> tags. I solved this by using "safe" template filter.
>>>> {{ var | safe }}
>>>>
>>>> here's the docs:
>>>> https://docs.djangoproject.com/en/dev/ref/templates/
>>>> builtins/#std:templatefilter-safe
>>>>
>>>> Hope this helps.
>>>> -matt
>>>>
>>>> On Thu, Oct 30, 2014 at 7:21 PM, Ross Laird <[email protected]>
>>>> wrote:
>>>>
>>>>> I'd like to render some charts, using Chart.js, but I can't seem to
>>>>> get the canvas tag to be preserved when I enter it into a rich text page.
>>>>> I
>>>>> have tinyMCE set up to accept all tags, and I have also added canvas to
>>>>> the
>>>>> ALLOWED_TAGS in defaults.py (thinking that this might not actually be a
>>>>> tinyMCE issue). But *something *continues to strip out these tags.
>>>>> Anybody have an idea what's going on?
>>>>>
>>>>> I suppose I might have to create a custom template for this, if I
>>>>> can't get it working through the interface.
>>>>>
>>>>> Ross
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Mezzanine Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.