What if you convert the html to an array of bytes before storing? 

Then you’d convert from bytes array back to string when you retrieve. This way 
you’d store raw data.


> On Apr 21, 2019, at 8:41 AM, Jani Tiainen <rede...@gmail.com> wrote:
> 
> Well after all, HTML is just plain text... Though you probably want to think 
> to do some sanitization so you won't get nasty injections via html.
> 
>> On Sat, Apr 20, 2019 at 9:09 PM Sipum Mishra <sipu...@gmail.com> wrote:
>> Hi friends,
>> 
>> I want to store a html in database using python and need to retrieve that 
>> html and convert that in to PDF.
>> can u plz suggest me how to store that HTML in DB ?
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/f301b675-6587-434e-b25d-87de9d9fef10%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> Jani Tiainen
> Software wizard
> 
> https://blog.jani.tiainen.cc/
> 
> Always open for short term jobs or contracts to work with Django.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAHn91oe6hUWZtEYCx%3D8uNe%3DFEphZ4C_VRPv74oK2E-x9gvJjGw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/47B36FA2-099C-4AAB-B5DA-1D9662513398%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to