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

Not seen in the DOCS. #1105

Closed
malutanpetronel opened this issue Feb 4, 2022 · 6 comments
Closed

Not seen in the DOCS. #1105

malutanpetronel opened this issue Feb 4, 2022 · 6 comments

Comments

@malutanpetronel
Copy link

HTML still not working as input as described bellow ?

Using > in yaml is trivial and working from ancient times. I am still wondering how to input this text into DB or what tricks should be done for make it work as both versions bellow are not able to be used.

Is it any reason is not shown in the documentation ?

some1:
    title: creation
    author: gogu
    blog: >
        we handle article
        <ul>
            <li>123</li>
        </ul>

        
some2:
    title: creation
    author: gogu
    blog: >
        <identity('
        we handle article
        <ul>
            <li>123</li>
        </ul>
        ')>            

With kind regards

@malutanpetronel
Copy link
Author

malutanpetronel commented Feb 4, 2022

parameters:
    text1:
        <ul>
        <li>123</li>
        </ul>
    
some3:
    title: creation
    author: Petro
    blog: >
        <identity('
        Some titel
        <{text1}>
        ')>

I get

In main.php line 50:

Warning: DOMDocument::loadHTML(): htmlParseStartTag: invalid element name in Entity, line: 1

@malutanpetronel
Copy link
Author

bin/console doctrine:fixtures:load --em=blog --env=www --group=www

@malutanpetronel
Copy link
Author

BIG SECRET :) use <{html}> which you can define in parameters:
Thank you

@malutanpetronel
Copy link
Author

However organizing a file like:

parameters:
page1_html1:
page1_html2:

page1:
title: Title1
text: <{page1_html1}>
page2:
title: Title1
text: <{page2_html1}>

seems horrible imo. I use for example in a yaml file 2030 lines. Now need to extract each html code into another tag... For my case this was not a big improvement... Also changing

<randomElement($array = array ('el1, el2, el3, el4'))>
to
<randomElement(['el1, el2, el3, el4'])>
but... is how life goes on and we keep having works to do...

@theofidry
Copy link
Member

I highly suggest to rely on a custom faker provider which I think removes the need to escape the whole thing

@theofidry
Copy link
Member

I'll close this as a duplicate of #840

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

2 participants