Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{{{ is adding an extra <p> at the end #1238

Closed
hguillermo opened this issue Jul 21, 2016 · 7 comments
Closed

{{{ is adding an extra <p> at the end #1238

hguillermo opened this issue Jul 21, 2016 · 7 comments

Comments

@hguillermo
Copy link

hguillermo commented Jul 21, 2016

I have this markup:

<p>While many people want to "buy local," the convenience of one-click shopping from services like Amazon and Instacart can trump goodwill. The founders of Kiezkaufhaus want to make online shopping from one's neighborhood as easy as buying from a big-box website. The site connects small local businesses on a single online platform and offers on-demand delivery service that uses eco-friendly bikes powered by senior citizens.<p>

After doing this {{{myVarHer}}} it creates another empty ``

at the end. Not sure why.

@stevenvachon
Copy link

@hguillermo
Copy link
Author

The value is coming from the db as a HTML and it is passed to the context. That's why I am using {{{. I am not sure if I understood what you are saying.

@stevenvachon
Copy link

stevenvachon commented Jul 21, 2016

We cannot see your html because you are not using markdown correctly to display your code.

Example:

<p>Correct {{{code}}}.</p>

@hguillermo
Copy link
Author

hguillermo commented Jul 21, 2016

It is a super basic markup. Guessing if there is a weird character in the string or so?

<p>While many people want to "buy local," the convenience of one-click shopping from services like Amazon and Instacart can trump goodwill. The founders of Kiezkaufhaus want to make online shopping from one's neighborhood as easy as buying from a big-box website. The site connects small local businesses on a single online platform and offers on-demand delivery service that uses eco-friendly bikes powered by senior citizens.</p>

@stevenvachon
Copy link

And the html around your variable?

@nknapp
Copy link
Collaborator

nknapp commented Jul 22, 2016

@hguillermo The closing tag of your html is <p> and not </p> (no slash). Is it the same in the real data our did this happen when you wrote the comment?

When you write <p>text<p> instead of <p>text</p>, your browser will clean the code by closing the first <p> tag and starting another one afterwards. If you are looking at the result in the DOM-Inspector, it will look like <p>text</p><p></p>. When you inspect the network traffic of the page-source, it should look normal.

@hguillermo
Copy link
Author

OMG! such a terrible mistake by my part. I just didn't see it the incorrect markup. I guess one of our markup validator library is not right.
My apologies guys for wasting your time and thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants