0

I have this html string:

<h1>MDPI Open Access Information and Policy</h1>

<div class="info-intro">All articles published by MDPI are made available under an open access license worldwide immediately. This means:
<ul>    

And i would like to store this in a string:

String abaut="<h1>MDPI Open Access Information and Policy</h1>

<div class="info-intro">All articles published by MDPI are made available under an open access license worldwide immediately. This means:
<ul>";

And i am gotting some problems: the string is not accepted because of some " inside of the string and some new lines. How can I do this differently?

2
  • 1
    i am gotting some problems Very good problem description! Commented Mar 12, 2012 at 12:20
  • sorry for this @WarrenFaith, i edited my question. Commented Mar 12, 2012 at 12:22

1 Answer 1

4

Probably you need to escape the " inside your string. Use \" instead.

Sample:

String abaut="<h1>MDPI Open Access Information and Policy</h1>" +
"<div class=\"info-intro\">All articles published by MDPI are made available under an open access license worldwide immediately. This means: <ul>";
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.