error:
<span class="label" id="span">
Hello
</span>
Can eslint restrict the specification of HTML?
right:
<span class="label"
id="span">
Hello
</span>
Related
I am currently working on a small project to create a simple social media web app and i am using Laravel. I used CK editor to make the posts in my media , but i found out that,I can use Javascript commands from the editor by going to the source code section.
How can i make it so that the commands don't run but also at the same time have a option to have bold, italic and different fonts and headers.
The following is my code for posting the posts or text;
*<div class="flex justify-center">
<div class="w-9/12 p-3 bg-stale-700 " >
#if ($posts->count())
#foreach ($posts as $post)
<div class="mb-4 p-4 bg-gray-300 rounded " >
<a href="" class="font-bold" > {{$post->user->username}} </a>
<span class=" p-3 text-sm"> {{$post->created_at->toTimeString()}} </span>
{!!$post->body!!}
</div>
#endforeach
{{ $posts->links('pagination::tailwind') }}
#else
There are no posts
#endif
<div>*
The following is the code for ckeditor:
*<form action="{{route('post')}}" method="post" >
#csrf
<textarea name="post"></textarea>
<script>
CKEDITOR.replace( 'post' );
</script>
#error('post')
<p class=" small-text red-200 "> This feild is required </p>
#enderror
<br>
<button class="bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded"> post </button>
</form>*
If possible, I am looking for editor like stackoverflow has,
Thank you
I have a list of posts and some of them has reactions, some not. I want to extract the number of reactions of each posts and the problem is that those who doesn't have, there is no HTML code.
I tried to debug using print.
print(len(driver.find_elements_by_xpath("//div[#class='occludable-update ember-view']")))
-----
Output: 4 - This is good, because I have 4 divs
print(len(driver.find_elements_by_xpath("//span[#class='v-align-middle social-details-social-counts__reactions-count']"))
----
Output:2 - This is good, because I have 2 posts that got reactions
When I tried to find if a posts got reactions,
print(len(driver.find_elements_by_xpath("//div[#class='occludable-update ember-view']")[1].find_elements_by_xpath("//span[#class='v-align-middle social-details-social-counts__reactions-count']")))
----
Output: 2 - Why? Because the second div is empty...
HTML CODE
<div class="occludable-update ember-view">
<ul class="social-details-social-counts ">
<li class="social-details-social-counts__reactions social-details-social-counts__item ">
<button class="social-details-social-counts__count-valuet " aria-label="1 Reaction’ post" type="button">
<img class="reactions-icon social-detail">
<span aria-hidden="true" class="v-align-middle social-details-social-counts__reactions-count">3</span>
</button>
</li></ul>
</div>
<div class="occludable-update ember-view"> this div has no reaction </div>
<div class="occludable-update ember-view"> this div has no reaction </div>
<div class="occludable-update ember-view">
<ul class="social-details-social-counts ">
<li class="social-details-social-counts__reactions social-details-social-counts__item ">
<button class="social-details-social-counts__count-valuet " aria-label="1 Reaction’ post" type="button">
<img class="reactions-icon social-detail">
<span aria-hidden="true" class="v-align-middle social-details-social-counts__reactions-count">3</span>
</button>
</li></ul>
</div>
to locate the continuation element, use .
try below :
driver.find_elements_by_xpath("//div[#class='occludable-update ember-view']")[1].find_elements_by_xpath(".//descendant::span[#class='v-align-middle social-details-social-counts__reactions-count']")
I found the problem. After better documenting myself, I found out that for sub-elements is used .// instead of //
print(len(driver.find_elements_by_xpath("//div[#class='occludable-update ember-view']")[1].find_elements_by_xpath(".//span[#class='v-align-middle social-details-social-counts__reactions-count']")))
Do you have any idea about this div just disappearing in Edge?
<div
data-filter=".format-${format.id}" class="format cbp-filter-item btn dark btn-outline uppercase"
repeat.for="format of fm.campaignFormats.items | formatsWithDraft"
oa-sortable-item="item.bind: format"
if.bind="(format.just_created && !format.deleted_at) || (!format.deleted_at && format.total_templates)">
<span class="name">${format.name}</span>
<span class="size">${format.width} : ${format.height} [${format.unit}]</span>
<span class="placeholder">${format.name}</span>
<span class="placeholder">${format.width} : ${format.height} [${format.unit}]</span>
<i if.bind="format.loading" class="fa fa-spin fa-circle-o-notch ml-5"></i>
<div class="filter-counter">${format.total_templates}</div>
</div>
I think it's a problem with Aurelia reading data, any ideas?
The issue you encounter is because of attribute reordering in IE & Edge, which in your case will make repeat come after if, which messed up the expression evaluation result. What you can do is to wrap your content in <template/> to separate the attribute:
<template
repeat.for="format of fm.campaignFormats.items | formatsWithDraft">
<div
data-filter=".format-${format.id}"
class="format cbp-filter-item btn dark btn-outline uppercase"
oa-sortable-item="item.bind: format"
if.bind="(format.just_created && !format.deleted_at) || (!format.deleted_at && format.total_templates)">
<span class="name">${format.name}</span>
<span class="size">${format.width} : ${format.height} [${format.unit}]</span>
<span class="placeholder">${format.name}</span>
<span class="placeholder">${format.width} : ${format.height} [${format.unit}]</span>
<i if.bind="format.loading" class="fa fa-spin fa-circle-o-notch ml-5"></i>
<div class="filter-counter">${format.total_templates}</div>
</div>
</template>
What is the problem with my code when tested with https://search.google.com/structured-data/testing-tool?
I have tried to set up structured data for JobPosting and then added location. But i dont have an exact postal address: so no zip code and no street just a city.
<div itemscope itemtype="http://schema.org/JobPosting">
<h2 itemprop="title">Data Analyst</h2>
<span itemprop="description">
<strong>Company:</strong>
<span itemprop="hiringOrganization">
<span itemscope itemtype="http://schema.org/Organization">
<span itemprop="name">
Euro London Banking and Finance Germany
</span>
</span>
</span>
</span>
<p><strong>Location:</strong>
<span itemprop="jobLocation">
<span itemscope itemtype="http://schema.org/Place">
<span itemprop="address">
<span itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="addressLocality">Mycityname</span>
</span>
</span>
</span>
</span>
</p>
<p><strong>Employment type:</strong>
<span itemmprop="employmentType">
Full-time
</span>,
<span itemprop="workHours">
40 hours per week
</span>
</p>
<p><strong>Base salary:</strong>
<span itemprop="salaryCurrency">
EUR
</span>
<span itemprop="baseSalary">
35000
</span>
</p>
<p><strong>Responsabilities:</strong></p>
<ul itemprop="responsibilities">
<li>a</li>
<li>b</li>
<li>c</li>
</ul>
<p><strong>Educational requirements:</strong>
<span itemprop="educationRequirements">
Bachelor's degree
</span>
</p>
<p><strong>Experience requirements:</strong>
<span itemprop="experienceRequirements">
At least 2 years of working experience, however recent graduates with relevant technical knowledge and experience through
internships, etc. will also be considered
</span>
</p>
<p><strong>Qualifications:</strong></p>
<ul itemprop="qualifications">
<li>Profound knowledge of SQL Server and relational databases</li>
<li>Profound knowledge of Visual Basic for Applications</li>
<li>Profound knowledge of Microsoft Excel and Access</li>
<li>Knowledge in ASP.Net and HTML is preferred</li>
<li>Fluent in English; knowledge of the German language is preferred but not a must</li>
</ul>
<p><strong>Skills:</strong></p>
<ul itemprop="skills">
<li>Good analytical skills</li>
<li>Good communication and interpersonal skills</li>
<li>Ability to work in teams</li>
<li>Stress resilient, goal-oriented and efficient</li>
</ul>
<p><strong>Date posted:</strong>
<span itemprop="datePosted">
2011-11-29
</span>
</p>
</div>
To me it seems that I can have text value for addres property. that is also what schema.org says. still it does not get verified :(
Use itemprop and itemtype in the same span
<span itemprop="jobLocation" itemscope itemtype="http://schema.org/Place">
<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="addressLocality">Mycityname</span>
</span>
</span>
The Place type can accept Text as well as a postalAddress type (http://schema.org/address) therefore you can do the following as a minimum and still be valid:
"jobLocation": {
"#type": "Place",
"address": "Central City"
}
I just tested it and although you will get warnings, you will get no errors.
There is a standard Pager component which renders below html structure:
<div class="xspPagerContainer">
<div class="xspPagerRight" id="view:_id1:pager1">
<span class="xspPagerNav xspFirst" id="view:_id1:pager1__First">
First
</span>
<span class="xspPagerNav xspPrevious" id="view:_id1:pager1__Previous">
Previous
</span>
<span class="xspPagerNav xspGroup" id="view:_id1:pager1__Group">
<span>
<span class="xspFirstItem xspCurrentItem">
1
</span>
<span>
<a>2</a>
</span>
<span class="xspLastItem">
<a>3</a>
</span>
</span>
</span>
</div>
</div>
I would like to add some extra html tags like into above structure:
<div class="xspPagerContainer">
<div class="xspPagerRight" id="">
<span id="NewSpan"></span>
<span class="xspPagerNav xspFirst" id="someId">
First
</span>
<span class="xspPagerNav xspPrevious" id="view:_id1:pager1__Previous">
Previous
</span>
I was trying to use renderer to do it but I was not able to add anything inside xspPagerContainer div. All I achieved was to add something before or after this div.
Is something like this possible? How can I add html tag to already existing component without javascript (jQuery etc.) ? Should I create own component and create own renderer ?
This is IBM variation of JSF used in Xpages.