Please check the below code
<!-- Calendly inline widget begin -->
<div class="calendly-inline-widget" data-url="https://calendly.com/example/chat?text_color=202a3b&primary_color=4eaf4e" style="min-width:800px;height:800px;"></div>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
<!-- Calendly inline widget end -->
I am trying to add this code as an HTML block in my WordPress website powered by Elementor Pro
. I am getting the error name entity expected, got none
for the div
section.
What is causing this?
2
Answers
The character
&
starts an entity.&primary_color
isn’t a valid entity, hence the error.The
&
should be represented by the entity for&
which is&
.The accepted answer is incorrect in this context. This is an Elementor error, not a real issue. Since the ampersand is part of the URL as a delimiter, it’s valid and is NOT an entity. (Indeed it should NOT be encoded, which would change it from a delimiter to a value.)
Should an ampersand be URL encoded in a query string?
So, an ampersand within a URL should be encoded ONLY if it’s part of a value and has no delimiting role (separating values).
Elementor needs to fix this, not you. Vendors who give us embed code formatted this way are correct, not Elementor.