Currently I have it set up so my Notes in evernote can be displayed on a website for content, but they don't show the way they should. I can't figure out how to get it to just display the way I try. Pictures don't show, links, videos, it all gets stripped out and says
WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).
I understand to prevent xss attacks they've done this to me, but how to I stop it??
Currently I'm using this in the HTML template
<div [innerHTML]="note"></div>
where note is the string containing my ENML.
I'm just not sure where to start. I am hoping there's a quick easy way to just make it display the way it displays in Evernote itself.
Found the solution! I just did a pipe to mark the content as safe, like this guy did here:D
Related
I'm using wkhtmltopdf to convert an html template into a pdf, and I want to use some html as a footer, but as far as I can tell I have to make the html a webpage, which means it would be visible to the public. So I have two questions:
Is there any way to use a string or a file with footer-html?
If not, is there any way to prevent the footer webpage from being visible to the public? I'm using flask to make my website.
Why do you not want anyone to see the footer tag?
A <footer> element typically contains:
authorship information
copyright information
contact information
sitemap
back to top links
related documents
Also, no one can see your html unless you publish it.
If this does not answer your question, consider to edit it with a more clear question.
If you really want to hide it you can go to the link below ^^
W3schools Example
After a fair bit of looking around, the only way I've found to get a signature on gmail is to copy the rendered HTML signature. Two problems arose: 1) I couldn't actually select my entire signature, and I can't even see what I am selecting like how it works with regular text and other's tutorials for gmail signatures. 2) If I press Ctrl+A on Firefox (Chrome only copies half, even when I use Ctrl+A), I can manage to copy my signature, but if I try to paste in the signature box, it glitches out and appears static in the top left of that specific Chrome/Firefox tab, like this (edited for privacy reasons):
And if I try to just go for it and email (after saving changes), no signature will be rendered at all. Not too sure what to do at this point, so any suggestions are welcome.
Thanks.
EDIT: This is the HTML I use to render the signature. As a side note, I do replace those placeholder file names with links from an image hosting site. I also add 3 tags around a few of the ""s.
Ultimately I found the solution after playing with various HTML and image options. The problem lies in my use of the <div> tag for the layout of the signature. I should have been using <td>. Using the slice tool in Illustrator will render the HTML with <div> tags, while using ruler guides in Photoshop and saving for web (I used the legacy option) will render with <td> tags. I'm going to do a little more digging and see if using guides in Illustrator will still render with <div> tags, but I'm not sure if this site is the place to discuss this piece of the problem.
EDIT: By the way, Illustrator just really likes <div>s, so if anyone is looking to do this same thing, use Photoshop's legacy Save for Web mode. It will generate the <td> tags for you.
I don't have direct Host or Superuser access to DNN and the way our system is set up I wont get access to those accounts. It is a policy where i work. Is there ANY way to get your HMTL/CSS to actually work as you put it into the DNN HMTL editor? I have tried adding things like an accordion sidebar, tabbed area, and a simple CSS image hover. DNN takes my code and jumbles it up so that it does not work correctly. I have taken markup straight from my text editor, into dnn (that was working fine in the browsers before i took it into DNN) and it shows up, but does not act like it should or the code gets jumbled and breaks and I spend an hour trying to fix it EVERY TIME.
Has anyone out there had the same issue, or any suggestions, tricks to get your markup to work correctly in DNN.
Thanks,
Yes and no, you can't add scripts in the html editor and if you are copy-pasting something that has a FORM element, it won't directly work without modification.
One possible way to keep your javascript working is to move it to the Header or Footer options in the module options of that module instead of the content.
As for if your code contains a FORM element, you can use javascript to modify the Asp.NET FORM element to suit your need, see http://dotnetnuke.bz/Articles/tabid/156/DotNetNuke/98/How-to-Include-Multiple-Forms-in-DotNetNuke.aspx for more details.
I am working on a relatively simple website and I am required to incorporate some form of news feed into it, that can be easily updated without having to re-upload the site each time.
My solution to this currently is to use an <iframe> that displays content from a Google Blogger blog. However, the fact the iframe is smaller than the width of the blog I am asking it to display, makes the whole thing look very messy and unprofessional.
I have tried to remove the majority of the formatting from my blog, so it looks better in the iframe, however this also means the blog has no formatting when viewed fullscreen, or on the blogger site itself.
My question is:
I am wondering if I can manually retrieve the blog posts feed from blogger's database, and display them with my own formatting on my webpage, leaving the actual blog page untouched?
I hope I have explained that well enough, please comment if you require clarification.
Well, from my point of reference your problem is more of customising your blog. Well you can try this.
blogger-->Template-->Edit HTML(Instead of customisation)
There you will get messy HTML code. Find CSS Strips and edit as you want them. You can change variety from there. Gracius
Is there a way to embed only a section of a website in another HTML page?
Example: I see an answer I want to blog about, so I grab the HTML content, and splat it in somewhere, and show only that, styled like it is on stackoverflow. Basically, I want to blockquote the section of the page with original styling, if that makes sense. Is that something the site itself has to provide, or can I use an iframe and tell it to show only a certain element or something crazy? Open to all options, but I want it to show up as HTML, not as an image (that's really a last resort).
If this is even possible, are there security concerns I need to aware of?
Don't think image should really be last resort. You have no control over the HTML/CSS of the source page, so even if you craft a solution (probably by using JavaScript to parse out the desired snippet) there is no guarantee that tomorrow the site doesn't decide to change its layout.
Even Jeff, who has control over the layout of stackoverflow.com, still prefers to screen-capture the site, rather than pull in the contents live.
Now if your goal was to have the contents auto-update, that would be a different story. But still, unless you use some agreed-upon method of sharing content, such as RSS, your solution would be very fragile.
The concept you are describing is roughly what is called a "purple include" or "transclusions". There is a library out there for it, but its not exactly actively developed. Here's a couple ajaxian articles on it.
I'd recommend using a server side solution with Python; using urllib2 to request the page, then using BeautifulSoup to parse out the bit that you need. BeautifulSoup has a very flexible selection api with which you can craft heuristics for the section you are interested in.
To illustrate:
soup = BeautifulSoup(html)
text = soup.find(text="Some text on the page that is unlikely to change")
print soup.parent.prettify()
That way if the webmaster later changes the markup on the page, your scraping script should still work.
On client side <iframe> is the only practical option. It is possible to scroll it, but it might not work in the long term, because it's technically close to clickjacking attack.
There's also cross-site XHR, but requires opt-in from destination site, and today works only in few latest browsers.
Getting HTML on server side is easy (every decent web framework has ability to download page and parse HTML and you can use XPath/XSLT or DOM to extract bit you want).
Getting styles however is going to be tricky – CSS rules may not work with HTML fragment taken out of context. You'd have to parse CSS, extract and transform rules or use browser and read currentStyle of every node.
Obviously you have to heavily filter HTML you extract to avoid XSS. It's harder than it seems.
If you don't need to automate this, a good HTML+CSS WYSIWYG editor might be able to extract content fragment with styles.
That sounds like something that IE8's Web Slices would be perfect for. However, it's only available in IE8, and the site of origin would have to implement for you to be able to take advantage of it.