hey everyone am trying to add my title tag but every time i try to put it in the format of Company name| Primary keyword and Secondary keyword i get parsing error which is ''Error parsing XML, line 516, column 29: Element type "ShareFreeTemplates" must be followed by either attribute specifications, ">" or "/>" and here is my html code
<b:include data='blog' name='all-head-content'/>
<!--::::::::::: Block2: Output Index Title,keywords,decription and Post Title,description -->
<!-- Post/Archive Page -->
<b:if cond='data:blog.pageType != "index"'>
<title><data:blog.pageName/></title>
<!-- Index Page -->
<b:else/>
<title><ShareFreeTemplates|Free After Effects Templates And-Tutorials /></title>
<meta content='after effects free templates, templates, after effects project files, free download' name='keywords'/>
</b:if>
if somebody can edit that title tag to give me no errors i want it like that ''Free After Effects Templates and Project Files| ShareFreeTemplates'' and thx in regards
This is how the title tag works in standard HTML coding.
<title> insert words here </title> are the tags used. and then you insert the words in between the two tags like so
<title>ShareFreeTemplates|Free After Effects Templates And-Tutorials </title>
you dont need to encapsulate your title in another pair of tags.
<title><ShareFreeTemplates|Free After Effects Templates And-Tutorials /></title>
^ ^^
//remove the characters where the arrows are pointing at
Related
I'm using Tiny 4.9.10 to dynamically generate reports based on templates. Users can create templates which contain placeholders. These placeholders then get swapped out for their actual values when generating the actual report. The placeholders get their style (including font, which is the main issue here) from their enclosing <span>-tag.
When replacing the placeholder with their actual value, we use <br />-tags to insert new lines, since some of the placeholders are almost full reports on their own which need to be structured.
After the placeholders have all been replaced, we inject this dynamically generated content back into a Tiny editor, so as to allow users to make ad hoc changes to the content.
At this point however we noticed that the <span>-tag around a piece of generated content containing <br />-tags gets removed. This is a problem, because the style info that was enclosed in this tag gets removed as well, resulting in problems further down the line when generating a PDF.
What I've tried to work around this:
setting verify_html to false
adding +span[br]/+span[br /] to valid_children
setting forced_root_bloc to div
The first two options did nothing to help me, and while the last one looked promising, it didn't help, because even when using <div>, font info gets enclosed into a child <span>.
I know this is expected behavior, because <span> is an inline tag and so it shouldn't have <br /> tags as children, but I'm currently at a loss for a workaround which allows me to include <br /> tags into my dynamically generated content without losing the style (most importantly the font) of the parent tag.
So I solved this by replacing the <span> tags by <div> tags when we swap out the placeholders by using some regex looking for spans that enclose a <p>...<\p> or a <b />. This stops Tiny from throwing away the <span> tags when they contain either of these enclosed tags
TinyMCE considers the <span> <br /> </span> construct an empty space and deletes it in favor of optimization.
I may be late, but you can also try using this callback in the setup option to stop the editor from removing empty spans:
setup: function(editor) {
editor.on('PreInit', function() {
editor.schema.getElementRule('span').removeEmpty = false;
});
}
From example in openingHours property, it says
Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
Shall I assign days by all my supported languages? So if I support Dutch I shall give the schema [Ma, Di, Wo, Do, Vr, Za, Zo] instead?
And how it works? Does Google take the Dutch text from user then searches for schema in the same language? Or translate it to English then searches for English schema?
These are reserved values that should not be translated. You can visually hide these values from your visitors, e.g., because your content is in another language, or because you don’t want to use those abbreviations.
JSON-LD
In JSON-LD, the structured data isn’t visible anyway, so you can use any appropriate HTML element to visibly represent the opening hours.
Microdata
You can use the meta element (uncoupled from the visible content), or the data element (coupled to the visible content), or an element like p or span.
<meta itemprop="openingHours" content="Tu,Th 16:00-20:00" />
<p>dinsdag - donderdag: 16-20 uur</p>
<data itemprop="openingHours" value="Tu,Th 16:00-20:00">
dinsdag - donderdag: 16-20 uur
</data>
RDFa
You can use the meta element (uncoupled from the visible content), or an element like p or span (coupled to the visible content), but not data.
<meta property="openingHours" content="Tu,Th 16:00-20:00" />
<p>dinsdag - donderdag: 16-20 uur</p>
<p property="openingHours" content="Tu,Th 16:00-20:00">
dinsdag - donderdag: 16-20 uur
</p>
I have sling mappings setup that rewrite outgoing paths to the external URL. An example of this rewrite:
/content/www-sitename/home.html would be rewritten to http://www.sitename.com/home.html
I have also configured the LinkCheckerTransformerFactory: linkcheckertransformer.rewriteElements=["a:href","area:href","form:action","link:href","meta:content"]
Some HTML on a page component:
<head>
<link rel="canonical" href="/content/www-sitename/home.html" />
<meta name="canonical" content="/content/www-sitename/home.html" />
</head>
When visited, only the link:href has been rewritten, meta:content is unchanged:
<head>
<link rel="canonical" href="http://www.sitename.com/home.html" />
<meta name="canonical" content="/content/www-sitename/home.html" />
</head>
Worth noting is that the link:href was not rewritten prior to configuring the linkcheckertransformer.rewriteElements to include it. Why did this change work for link:href, but not meta:content. Aside from creating a custom rewrite filter, what can be done to get links in meta:content attributes to be rewritten?
nerd answer is correct, by default the internal Sling mechanism responsible for parsing HTML (htmlparser) supports only following tags: a, area, form, base, link, script, body, so even if you add meta:content to the LinkChecker configuration, CQ won't recognize the <meta> as a tag which needs processing.
In order to reconfigure htmlparser, create a node named generator-htmlparser under /libs/cq/config/rewriter/default with following properties:
jcr:primaryType = nt:unstructured
includeTags = [A, AREA, FORM, BASE, LINK, SCRIPT, BODY, META]
The includeTags property should be multivalued, so you can add other tags in the future.
If you don't want to override the content under /libs, create your own rewriter configuration:
Copy /libs/cq/config/rewriter/default and its children to /apps/YOURAPP/config/rewriter/my-rewriter.
Set order property on the my-rewriter to 1.
Create generator-htmlparser under the my-rewriter as above.
I think you have to add meta tag to the htmplparser generator.
see my question and answer: How to add additional element to htmlparser generator
I am getting validation errors with the inputmode attribute on text areas and text fields. The validator tells me Attribute inputmode not allowed on element input at this point but the HTML5 spec indicates that it is allowed.
Is there actually something wrong with this code, or is the validator at fault?
Here is a bare bones case which will produce exactly this kind of validation error (twice), in one case on an email input, and on the other on a textarea.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<form method="post" action="contactme.php">
<label class='pas block'>
Your E-Mail:<br/>
<input type='email' name='email' required inputmode='latin' placeholder='your e-mail here' />
</label>
<label class='pas block'>
Your Message:<br/>
<textarea name='message' required inputmode='latin' placeholder='and your message here!'></textarea>
</label>
</form>
</body>
</html>
Also, see the chart about which attributes apply to the different input types here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#attr-input-type
The "inputmode" attribute applies only to "text" and "search".
UPDATE 2019-09-04: "inputmode" is now a global attribute (per WHATWG) and can be specified on any HTML element: https://html.spec.whatwg.org/multipage/dom.html#global-attributes
Another reference page for "inputmode":
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
On another note, "inputmode" is not a W3C HTML5 attribute, but it is a W3C HTML 5.1 attribute (at least at the time I'm writing this). UPDATE 2019-09-04: "inputmode" has been removed from HTML 5.2 and HTML 5.3.
The HTML5 spec says
The following content attributes must not be specified and do not apply to the element: accept, alt, checked, dirname, formaction, formenctype, formmethod, formnovalidate, formtarget, height, inputmode, max, min, src, step, and width.
It's under bookkeeping details at https://html.spec.whatwg.org/multipage/input.html#e-mail-state-(type=email)
Five years after the question was asked, some may wonder why some of the properties listed by #dsas doesn't trigger such errors, like enctype
The answer is simple support, while enctype for instance gained a wide support
inputmethod is supported only as of IE11 and Edge 14, for more infos click here
I want to put an anchor tag into a Struts2 variable that I can then display at various points in a JSP. That way I can avoid duplicating the complicated if/then statements that are used to build various forms of the href tag.
I'm using the Struts 's:set' tag to do this.
The problem is that Struts converts the '<' characters to htmlentities and when the page displays I see the actual "a href=someURL" tag displayed, not a working link.
If I add the "escape='true'" argument to s:set it does the same thing, only it displays the htmlentities for the '<' and '>' tags.
How do I put a valid anchor tag into a Struts2 variable and then display it as a working link?
Here's what I'm doing:
<s:set name="composerName">
<s:property value="'a href=%{viewRecordURL}>'" escape="false"/>
<s:property value="#composer.title" />
<s:property value="#composer.firstName" />
<s:property value="#composer.lastName" />
<s:property value="'</a>'" escape="false" />
</s:set>
Use s:url to create a valid url and then use it in s:a to generate the link.
You can refer the link below for more details:
http://struts.apache.org/2.1.8/docs/a.html
We can use url tag to create URL like mention below
<s:url id="hLink" action="yourStrutsActionName">
<s:param name="propertyName" value="%{propertyName}" />
</s:url>
<td><s:a href="%{hLink}"><s:property value="%{propertyName}"/></s:a></td>
do this easy way to set the link in Struts2
// add the Struts2 action in href
<s:a href="forgetPasswordPage.action" >Forget Password</s:a>
This isn't how you want to build this--what you have is two different things, a URL, and the text string of that url. The URL you already have. Only use <s:set> for the link text.
If you really need to, you can wrap this up into a JSP-based custom tag, but I wouldn't bother.
I'll answer my own question. Maybe someone else has a more elegant solution. Once again, we're trying to get both an anchor tag and a url into a s:set variable. The issues were two: 1) getting s:set to treat the tag string as a literal string and not an Object (which it wants to fetch from ActionContext or somewhere), and 2) turning off escaping so that the string text of the anchor tag isn't converted into htmlentities like '& lt;'.
For 1, I set the var to null, but provide a default argument, which s:property always treats as a literal string.
For #2, it's just a matter of using escape="false" in the right places.
Unfortunately, the string has to be built up with separate bits of s:property, but what can you do?
<s:set name="composerName" >
<s:property value="" default="<a href=" escape="false"/>
<s:property value="" default="'" />
<s:property value="%{viewRecordURL}" escape="true"/>
<s:property value="" default="'>" escape="false" />
<s:property value="#composer.title" />
<s:property value="#composer.firstName" />
<s:property value="#composer.lastName" />
<s:property value="" default="</a>" escape="false"/>
</s:set>
I haven't tested it yet with UTF-8 characters or potentially problematic characters like '&', apostrophe, or single quote in the #composer part.
I had the same issue, and I just solved it as following:
In the main bean, I have the following variables with Setters and Getters:
private int ReqNo;
private String hyperLinkToPage;
In the JSP page I have the TD as following:
<td class="displayValue" style="width: 10%;"><s:a href="%{hyperLinkToPage}"><s:property value="%{ReqNo}"/></s:a></td>
I hope that it will help.