I get this error and I do not know why it is: URIs must begin with 'https: //' or 'http: //' or 'data:

-2
    <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1 style="background-color:rgb(0,255,0)">BIENVENIDOS AL SERVIDOR DE GREAT GREEN!</h1>
<p> <a href="https://pokemonshowdown.com/rules">Por favor, respeta las normas de la comunidad.</a></p>

<img src="pp.png" alt="Logo" width="128" height="128">

</body>
</html>
    
asked by Nacho Ochaita del Rio 28.10.2016 в 00:07
source

1 answer

1

A simple search on Google takes us to this page on GitHub

Specifically, your error occurs in this part of the code:

canEmbedURI(uri, isRelative) {
    if (uri.startsWith('https://')) return uri;
    if (uri.startsWith('//')) return uri;
    if (uri.startsWith('data:')) return uri;
    if (!uri.startsWith('http://')) {
        if (/^[a-z]+\:\/\//.test(uri) || isRelative) {
            return this.errorReply("URIs must begin with 'https://' or 'http://' or 'data:'");

Review the use you are making of this function, as it seems that as indicated by the error message, you are not receiving the string start (URI) that you expect.

EDITING:

The problem is that any URI you use in that HTML code must be preceded by http:// , https:// or data: .

To solve the problem replace:

<img src="pp.png" alt="Logo" width="128" height="128">

for the full path to your image:

<img src="http://www.miservidor.com/pp.png" alt="Logo" width="128" height="128">

Do not forget to include http:// or https:// ahead of the name of the image.

Greetings

    
answered by 28.10.2016 в 00:26